[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [pkg-wine-party] Send error messages to STDERR



On 02/11/2016 09:33 PM, Joerg Schiermeier wrote:
> While wine is used in a script the homebrewed wrapper scripts you added for 
> Debian is producing noise which is disturbing a script e.g. shell script.
> So please send (error/debug) messages to the error channel STDERR.
> 
> See patch for 
> 
> 1.) /usr/bin/wine-development
> 2.) /usr/lib/wine-development/wineserver

Looks good to me, committed to stretch and master.

I further propose the attached patch. It always outputs a warning if
wine32 is missing, and it shows the debug hint only if WINEDEBUG is
empty. Finally it shows "err+all,fixme+all". I'm not sure if you didn't
use the latter on purpose, Mike, therefore not committing.

Besides that, I'm really happy about the new messages. This setup fits
my use-cases just perfectly and should also address the problems in the
upstream bug tracker/support. Thanks!

Greets
jre
diff --git a/debian/scripts/wine b/debian/scripts/wine
index aa95127..2680ab8 100755
--- a/debian/scripts/wine
+++ b/debian/scripts/wine
@@ -13,11 +13,12 @@ elif test -x $wine64; then
     if test -z "$WINELOADER"; then
         export WINELOADER=$wine64
     fi
-    if [ "$(dpkg --print-architecture)" = "amd64" -a "$(dpkg --print-foreign-architectures | grep -cx "i386")" -ne 1 ] ||
-       [ "$WINEARCH" = "win32" ]; then
+    if [ "$(dpkg --print-architecture)" = "amd64" -a "$(dpkg --print-foreign-architectures | grep -cx "i386")" -ne 1 ]; then
         echo "it looks like multiarch needs to be enabled.  as root, please" >&2
         echo "execute \"dpkg --add-architecture i386 && apt-get update &&" >&2
         echo "apt-get install $(echo $script | sed s/wine/wine32/)\"" >&2
+    else
+        echo "$(echo $script | sed s/wine/wine32/) is not installed, expect errors." >&2
     fi
 else
     echo "error: unable to find wine executable.  this shouldn't happen." >&2
diff --git a/debian/scripts/wineserver b/debian/scripts/wineserver
index d3db7db..2a21b2c 100755
--- a/debian/scripts/wineserver
+++ b/debian/scripts/wineserver
@@ -20,7 +20,9 @@ arch=$(dpkg --print-architecture)
 version=$($wineserver --version 2>&1 | cut -d- -f2)
 
 echo "Executing $script ($(basename $wineserver)) $version on Debian $dist ($arch)." >&2
-echo "If something goes wrong, please rerun with \"WINEDEBUG=err+all $script\"" >&2
-echo "for more detailed debugging output." >&2
+if test -z "$WINEDEBUG"; then
+    echo "If something goes wrong, rerun for more detailed debugging output with:" >&2
+    echo "  WINEDEBUG=\"err+all,fixme+all\" $script" >&2
+fi
 
 exec $wineserver -p0 "$@"

Reply to: