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

[pkg-wine-party] [PATCH 6/8] Remove architecture-specific warning from wine-launcher.



The mdns problem is gone and the architecture-specific warning is
taken care of by the fake /usr/bin/wine from wine-loader-32:amd64
---
 debian/rules        |    4 ++--
 debian/winelauncher |   46 +++++++---------------------------------------
 2 files changed, 9 insertions(+), 41 deletions(-)
 mode change 100644 => 100755 debian/winelauncher

diff --git a/debian/rules b/debian/rules
index 3c795a0..0009a25 100755
--- a/debian/rules
+++ b/debian/rules
@@ -268,10 +268,10 @@ install-arch64-stamp: build-arch64-stamp $(patsubst build%,install-arch%-stamp,$
 	mv debian/tmp/usr/share/man/man3w debian/tmp/usr/share/man/man3
 	install build64/tools/fnt2bdf debian/tmp/usr/bin
 	rm -f debian/tmp/usr/bin/winelauncher
-	sed "s,usr/lib/wine,$(AMD64_WINEDIR)," debian/winelauncher > debian/tmp/usr/bin/wine-launcher
 
-	# install warning script
+	# install warning script and launcher
 	install -D -m755 debian/wine-dummy debian/tmp/usr/bin/wine
+	install -D -m755 debian/winelauncher debian/tmp/usr/bin/wine-launcher
 
 	# install tools
 	cp tools/font_convert.sh debian/tmp/usr/bin/wine-font-convert
diff --git a/debian/winelauncher b/debian/winelauncher
old mode 100644
new mode 100755
index f198cee..3bab91c
--- a/debian/winelauncher
+++ b/debian/winelauncher
@@ -1,28 +1,25 @@
 #!/bin/bash
 
 XMESSAGE=/usr/bin/xmessage
-ARCH="`dpkg --print-architecture`"
 
 # Give a warning if launched from mailcap
 if [ `basename $0` = "wine-safe" ]; then
+ MALWARE_MSG=\
+"Wine will launch to run the requested Windows executable.
+To protect you from accidentally running malicious code,
+please confirm that this is what you intended to do."
  $XMESSAGE -center \
  -title "Launching Wine" \
  -default "No" \
  -buttons "No":0,"Yes":2 \
- "
- Wine will launch to run the requested Windows executable.
- To protect you from accidentally running a Windows virus,
- you must confirm that this is what you intended to do.
- " 2>/dev/null
+ "$MALWARE_MSG" 2>/dev/null
  safe_launch=$?
  if [ $safe_launch -eq 0 ] ; then
   exit 1
  fi
  if [ $safe_launch -eq 1 ] ; then
   # xmessage was unable to ask the user, try tty instead
-  echo "Wine will launch to run the requested Windows executable." >&2
-  echo "To protect you from accidentally running a Windows virus," >&2
-  echo "you must confirm that this is what you intended to do." >&2
+  echo "$MALWARE_MSG" >&2
   echo -n "(yes/no) " >&2
   read safe_confirm
   if [ "$safe_confirm" != 'yes' -a "$safe_confirm" != 'y' ] ; then
@@ -31,34 +28,5 @@ if [ `basename $0` = "wine-safe" ]; then
  fi
 fi
 
-# Check for known problem with amd64
-if [ "$ARCH" = "amd64" ]; then
-
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430845
-if grep -q "^hosts:.*mdns4_minimal \[NOTFOUND=return\]" /etc/nsswitch.conf && \
-   [ ! -e /usr/lib32/libnss_mdns4.so.2 ]; then
- $XMESSAGE -center \
- -title "Wine Warning" \
- "
- It appears that libnss-mdns is installed on your system,
- but lib32nss-mdns is not. Please note that Wine will not be
- able to access the Internet unless you either install
- lib32nss-mdns (or ia32-libnss-mdns), or uninstall libnss-mdns.
- " 2>/dev/null
- notify=$?
- if [ $notify -eq 1 ] ; then
-  # xmessage was unable to notify the user, try tty instead
-  echo "It appears that libnss-mdns is installed on your system," >&2
-  echo "but lib32nss-mdns is not. Please note that Wine will not be" >&2
-  echo "able to access the Internet unless you either install" >&2
-  echo "lib32nss-mdns (or ia32-libnss-mdns), or uninstall libnss-mdns." >&2
-  echo -n "(okay) " >&2
-  read confirm
- fi
-fi # nss_mdns4
-
-fi # amd64
-
-# Launch Wine
-export WINELOADER="/usr/lib/wine/wine.bin"
+export WINELOADER="/usr/bin/wine"
 exec "$WINELOADER" "$@"
-- 
1.7.10




Reply to: