[pkg-nvidia-devel] r995 - in /packages/nvidia-graphics-drivers/trunk/debian: nvidia-glx-dev.postinst nvidia-glx-ia32.postinst nvidia-glx-ia32.postrm nvidia-glx-ia32.preinst nvidia-glx.postinst nvidia-glx.postrm nvidia-glx.preinst

anbe-guest at users.alioth.debian.org anbe-guest at users.alioth.debian.org
Fri Jun 4 08:31:49 UTC 2010


Author: anbe-guest
Date: Fri Jun  4 08:31:39 2010
New Revision: 995

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=995
Log:
do not hard code the package name in the maintainer scripts, use the DPKG_MAINTSCRIPT_PACKAGE variable set by dpkg instead

Modified:
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-dev.postinst
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postinst
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postrm
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.preinst
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postinst
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-dev.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-dev.postinst?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-dev.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-dev.postinst Fri Jun  4 08:31:39 2010
@@ -8,7 +8,7 @@
         # <target: squeeze>
         if dpkg --compare-versions "$2" lt-nl 195.36.24-1 ; then
             # remove obsolete diversions
-            dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null
+            dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null
         fi
         # </target: squeeze>
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postinst?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postinst Fri Jun  4 08:31:39 2010
@@ -8,13 +8,13 @@
 	# <target: squeeze>
 	# remove diversion created before the
 	# /emul/ia32-linux/usr/lib => /usr/lib32 transition
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/emul/ia32-linux/usr/lib/nvidia/libGL.so.ia32-libs \
 		/emul/ia32-linux/usr/lib/libGL.so > /dev/null
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/emul/ia32-linux/usr/lib/nvidia/libGL.so.1.ia32-libs \
 		/emul/ia32-linux/usr/lib/libGL.so.1 > /dev/null
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/emul/ia32-linux/usr/lib/nvidia/libGL.so.1.2.ia32-libs \
 		/emul/ia32-linux/usr/lib/libGL.so.1.2 > /dev/null
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postrm?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.postrm Fri Jun  4 08:31:39 2010
@@ -6,13 +6,13 @@
     purge|remove)
 
 	# restore libGL.so* from ia32-libs, diverted to /usr/lib32/nvidia
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.ia32-libs \
 		/usr/lib32/libGL.so > /dev/null
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.1.ia32-libs \
 		/usr/lib32/libGL.so.1 > /dev/null
-	dpkg-divert --remove --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.1.2.ia32-libs \
 		/usr/lib32/libGL.so.1.2 > /dev/null
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.preinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.preinst?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.preinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx-ia32.preinst Fri Jun  4 08:31:39 2010
@@ -9,13 +9,13 @@
 	test -d /usr/lib32/nvidia || \
 		mkdir -p /usr/lib32/nvidia || true
 
-	dpkg-divert --add --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.ia32-libs \
 		/usr/lib32/libGL.so > /dev/null
-	dpkg-divert --add --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.1.ia32-libs \
 		/usr/lib32/libGL.so.1 > /dev/null
-	dpkg-divert --add --rename --package nvidia-glx-ia32 --divert \
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.1.2.ia32-libs \
 		/usr/lib32/libGL.so.1.2 > /dev/null
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postinst?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postinst Fri Jun  4 08:31:39 2010
@@ -46,9 +46,9 @@
         # <target: squeeze>
         if dpkg --compare-versions "$2" lt-nl 195.36.24-1 ; then
             # remove obsolete diversions
-            dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libGLcore.so.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null	
-            dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libGLcore.a.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.a > /dev/null
-            dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libglx.a.xlibmesa /usr/lib/xorg/modules/extensions/libglx.a > /dev/null
+            dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGLcore.so.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null	
+            dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGLcore.a.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.a > /dev/null
+            dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libglx.a.xlibmesa /usr/lib/xorg/modules/extensions/libglx.a > /dev/null
         fi
         # </target: squeeze>
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm Fri Jun  4 08:31:39 2010
@@ -32,22 +32,22 @@
     remove|abort-install)
 
 	if [ -L /usr/lib/libGL.so ] && \
-           [ "`dpkg-divert --listpackage /usr/lib/libGL.so`" = "nvidia-glx" ]; then
-		echo "Removing /usr/lib/libGL.so created by nvidia-glx."
+           [ "`dpkg-divert --listpackage /usr/lib/libGL.so`" = "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
+		echo "$DPKG_MAINTSCRIPT_PACKAGE: Removing /usr/lib/libGL.so created by trigger."
 		rm -f /usr/lib/libGL.so
 	fi
 
-	dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null
-	dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null
 
 	# work around dpkg-divert bug #581544: useless errors on not writable destination if source does not exist
 	if [ -d /usr/lib/nvidia ] && [ ! -d /usr/lib/xorg/modules/extensions ]; then
 	    mkdir -p /usr/lib/xorg/modules/extensions
 	fi
 	
-	dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null
 
-	dpkg-divert --remove --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
+	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
 
 	if [ -d /usr/lib/nvidia ]; then
 		rmdir /usr/lib/nvidia/ || true;

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst?rev=995&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst Fri Jun  4 08:31:39 2010
@@ -17,12 +17,12 @@
 	fi
 
 	# make new diversions
-	dpkg-divert --add --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null
-	dpkg-divert --add --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null
 
-	dpkg-divert --add --rename --package nvidia-glx --divert /usr/lib/nvidia/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null	
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null	
 
-	dpkg-divert --add --rename --package nvidia-glx --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
+	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
 
     ;;
 esac




More information about the Pkg-nvidia-devel mailing list