[Bug 48937] winepath uses dos instead of unix line endings

WineHQ Bugzilla wine-bugs at winehq.org
Wed Apr 15 18:45:34 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48937

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Fixed by SHA1|                            |4c391c1454ea5fcac0ac5d79365
                   |                            |1f3c20383ef6a
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

this is indeed fixed by commit
https://source.winehq.org/git/wine.git/commitdiff/4c391c1454ea5fcac0ac5d793651f3c20383ef6a
("winepath: Avoid CR characters in output.").

Thanks Alexandre for fast response.

I've checked 'winetricks' which is very often used by many people for
'winepath' usages:

--- snip ---
$ grep -Hrni "winepath "

src/winetricks:343:        if grep -obUa "Wine placeholder DLL" "$("$WINE"
winepath -u "c:\\windows\\system32\\kernelbase.dll" 2>/dev/null)" | grep -q
'64:Wine placeholder DLL'; then
src/winetricks:345:        elif grep -obUa "Wine builtin DLL" "$("$WINE"
winepath -u "c:\\windows\\system32\\kernelbase.dll" 2>/dev/null)" | grep -q
'64:Wine builtin DLL'; then
src/winetricks:890:                *) winetricks_early_wine winepath "$@" ;;
--- snip ---

It's a very narrow use-case that is affected due to this. The following
conditions have to be all met:

* Wine 5.6
* Winetricks 20200412
* 32-bit WINEPREFIX (WINEARCH=win32)
* run 'winetricks -q dotnet30sp1'

Introduced with:
https://github.com/Winetricks/winetricks/commit/d3be4c1533e976588125cd9d4e1106985e582a9b
("w_detect_mingw: better mingw detection"), part of Winetricks 20200412
release.

--- snip ---
$ winetricks -q dotnet30sp1
Executing mkdir -p /home/focht
Using winetricks 20200412-next - sha256sum:
1daad9db206d3b2a024147aa3f04925328d10d7eeaa450ac5b4b90353df9858c with wine-5.6
and WINEARCH=win32
Executing w_do_call dotnet30sp1
Executing mkdir -p /home/focht
Executing load_dotnet30sp1 
: No such file or directorydevices/c:/windows/system32/kernelbase.dll
: No such file or directorydevices/c:/windows/system32/kernelbase.dll
------------------------------------------------------
Unable to detect wine dlls, please file an issue on Github!
------------------------------------------------------
Executing w_do_call remove_mono
...
--- snip ---

The failure is not critical and not even worth to work around in 'winetricks'
for just one broken Wine release.

Tidbit: 'winetricks_early_wine' wrapper function exists for such scenario.
There was already a broken 'winepath' some years ago which caused undesired
characters in output.

Bug 25838 ("winepath and cmd output garbage (really, escape sequences) before
desired output").

https://github.com/Winetricks/winetricks/blob/1937853444257ca004e2a419a7e2e0f2260fe5b5/src/winetricks#L3325

--- snip ---
# Run a small wine command for internal use
# Handy place to put small workarounds
winetricks_early_wine()
{
    # The sed works around https://bugs.winehq.org/show_bug.cgi?id=25838
    # which unfortunately got released in wine-1.3.12
    # We would like to use DISPLAY= to prevent virtual desktops from
    # popping up, but that causes AutoHotKey's tray icon to not show up.
    # We used to use WINEDLLOVERRIDES=mshtml= here to suppress the Gecko
    # autoinstall, but that yielded wineprefixes that *never* autoinstalled
    # Gecko (winezeug bug 223).
    # The tr removes carriage returns so expanded variables don't have crud on
the end
    # The grep works around using new wineprefixes with old wine
    WINEDEBUG=-all "$WINE" "$@" 2> "$W_TMP_EARLY"/early_wine.err.txt | ( sed
's/.*1h.=//' | tr -d '\r' | grep -v -e "Module not found" -e "Could not load
wine-gecko" || true)
}
--- snip ---

Thanks to this, the broken 'winepath' in Wine 5.6 release has no effect on
Winetricks as the CR characters get stripped out in the wrapper.

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list