[pkg-nvidia-devel] r997 - in /packages/nvidia-graphics-drivers/trunk/debian: changelog nvidia-glx-ia32.postrm nvidia-glx-ia32.preinst nvidia-glx.postrm nvidia-glx.preinst

anbe-guest at users.alioth.debian.org anbe-guest at users.alioth.debian.org
Fri Jun 4 09:51:05 UTC 2010


Author: anbe-guest
Date: Fri Jun  4 09:51:04 2010
New Revision: 997

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=997
Log:
overhaul and synchronize the maintainer scripts

Modified:
    packages/nvidia-graphics-drivers/trunk/debian/changelog
    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.postrm
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst

Modified: packages/nvidia-graphics-drivers/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/changelog?rev=997&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/changelog (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/changelog Fri Jun  4 09:51:04 2010
@@ -49,6 +49,7 @@
     accidental linking with libGL.so.1 from NVIDIA is prevented in a different
     way
   * nvidia-glx: add Conflicts: fglrx-glx
+  * overhaul maintainer scripts
 
  -- Russ Allbery <rra at debian.org>  Wed, 26 May 2010 07:19:43 -0700
 

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=997&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 09:51:04 2010
@@ -2,8 +2,24 @@
 set -e
 
 
+# Rationale:
+#
+# Remove our diversions at the remove stage, since even if we have
+# configuration files left, we want to put back everything we moved.  Do not
+# try to do this again on purge since remove will have already been called.
+#
+# In the abort-install case, we may have gotten far enough to create our
+# diversions in our preinst, so back out of them.
+#
+# Leave all of our diversions alone during upgrades or aborted upgrades, since
+# we're staying installed in all cases and the diversions are still correct.
+#
+# It's not clear what to do on disappear, but for now leave everything alone
+# and assume that our overwriting package will have logic to take over the
+# diversions and doesn't want us messing with them.
+
 case "$1" in
-    purge|remove)
+    remove|abort-install)
 
 	# restore libGL.so* from ia32-libs, diverted to /usr/lib32/nvidia
 	dpkg-divert --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
@@ -16,7 +32,7 @@
 		/usr/lib32/nvidia/libGL.so.1.2.ia32-libs \
 		/usr/lib32/libGL.so.1.2 > /dev/null
 
-	test -d /usr/lib32/nvidia && \
+	test ! -d /usr/lib32/nvidia || \
 		rmdir /usr/lib32/nvidia || true;
 
     ;;

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=997&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 09:51:04 2010
@@ -5,10 +5,11 @@
 case "$1" in
     install|upgrade)
 
-	# divert libGL.so* from ia32-libs to /usr/lib32/nvidia
+	# the destination directory for the diversions
 	test -d /usr/lib32/nvidia || \
 		mkdir -p /usr/lib32/nvidia || true
 
+	# divert libGL.so* from ia32-libs to /usr/lib32/nvidia
 	dpkg-divert --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/libGL.so.ia32-libs \
 		/usr/lib32/libGL.so > /dev/null

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=997&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.postrm Fri Jun  4 09:51:04 2010
@@ -37,21 +37,28 @@
 		rm -f /usr/lib/libGL.so
 	fi
 
-	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
+	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 $DPKG_MAINTSCRIPT_PACKAGE --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 $DPKG_MAINTSCRIPT_PACKAGE --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;
-	fi
+	test ! -d /usr/lib/nvidia || \
+		rmdir /usr/lib/nvidia || true;
 
 	# work around dpkg-divert bug #581544: useless errors on not writable destination if source does not exist
 	rmdir /usr/lib/xorg/modules/extensions /usr/lib/xorg/modules /usr/lib/xorg 2>/dev/null || 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=997&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.preinst Fri Jun  4 09:51:04 2010
@@ -11,18 +11,25 @@
 case "$1" in
     install|upgrade)
 
-	# create new diversion directories
-	if [ ! -d /usr/lib/nvidia ]; then
+	# the destination directory for the diversions
+	test -d /usr/lib/nvidia || \
 		mkdir -p /usr/lib/nvidia || true
-	fi
 
 	# make new diversions
-	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 $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 $DPKG_MAINTSCRIPT_PACKAGE --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 $DPKG_MAINTSCRIPT_PACKAGE --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