mr_bones_    15/05/16 06:04:45

  Added:                joystick-1.4.8-udev.patch
  Log:
  look in both places for old and new udev package locations of udevadm (bug 
#543200)
  
  (Portage version: 2.2.18/cvs/Linux x86_64, unsigned Manifest commit)

Revision  Changes    Path
1.1                  games-util/joystick/files/joystick-1.4.8-udev.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-util/joystick/files/joystick-1.4.8-udev.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-util/joystick/files/joystick-1.4.8-udev.patch?rev=1.1&content-type=text/plain

Index: joystick-1.4.8-udev.patch
===================================================================
diff -ru linuxconsoletools-1.4.8.orig/utils/jscal-restore.in 
linuxconsoletools-1.4.8/utils/jscal-restore.in
--- linuxconsoletools-1.4.8.orig/utils/jscal-restore.in 2011-12-15 
10:49:01.000000000 -0500
+++ linuxconsoletools-1.4.8/utils/jscal-restore.in      2015-05-16 
01:54:00.799168225 -0400
@@ -6,8 +6,13 @@
     exit 1
 fi
 
-if [ ! -x /sbin/udevadm ]; then
-    echo Restoring joystick configuration requires udev! >&2
+for f in /sbin/udevadm /bin/udevadm ;
+do
+    [ -x $f ] && UDEV=$f
+done
+
+if [ -z "$UDEVADM" ] ; then
+    echo Storing joystick configuration requires udev! >&2
     exit 1
 fi
 
@@ -30,7 +35,7 @@
 # in the NAME value
 IFS=$'\x0A'
 
-for ATTRIBUTE in $( /sbin/udevadm info -a -n $1 | 
@@PREFIX@@/share/joystick/ident ); do
+for ATTRIBUTE in $( ${UDEVADM} -a -n $1 | @@PREFIX@@/share/joystick/ident ); do
     ID=$( echo "$ATTRIBUTE" | cut -f 1 -d = )
     VALUE=$( echo "$ATTRIBUTE" | cut -f 2 -d \" )
     case $ID in
diff -ru linuxconsoletools-1.4.8.orig/utils/jscal-store.in 
linuxconsoletools-1.4.8/utils/jscal-store.in
--- linuxconsoletools-1.4.8.orig/utils/jscal-store.in   2011-12-15 
10:49:01.000000000 -0500
+++ linuxconsoletools-1.4.8/utils/jscal-store.in        2015-05-16 
01:53:18.725607838 -0400
@@ -11,14 +11,18 @@
     echo "Stores the device's calibration for future use."
     exit 1
 fi
+for f in /sbin/udevadm /bin/udevadm ;
+do
+    [ -x $f ] && UDEV=$f
+done
 
-if [ ! -x /sbin/udevadm ]; then
+if [ -z "$UDEVADM" ] ; then
     echo Storing joystick configuration requires udev! >&2
     exit 1
 fi
 
 ident=$(mktemp)
-/sbin/udevadm info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
+${UDEVADM} info -a -n $1 | @@PREFIX@@/share/joystick/ident > $ident
 . $ident
 rm $ident
 




Reply via email to