[pkg-nvidia-devel] r1415 - /packages/nvidia-graphics-drivers/trunk/debian/

anbe-guest at users.alioth.debian.org anbe-guest at users.alioth.debian.org
Sat Aug 21 13:43:24 UTC 2010


Author: anbe-guest
Date: Sat Aug 21 13:43:24 2010
New Revision: 1415

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=1415
Log:
Handle ia32 alternatives of libGL.so* via trigger, too.

Added:
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.triggers
Modified:
    packages/nvidia-graphics-drivers/trunk/debian/changelog
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postinst
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postrm
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postrm

Modified: packages/nvidia-graphics-drivers/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/changelog?rev=1415&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/changelog (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/changelog Sat Aug 21 13:43:24 2010
@@ -4,6 +4,7 @@
   * Move trigger and maintainer scripts handling the diversions/alternatives
     of the libGL.so* from MESA to separate packages that can be used by the
     legacy packages, too: libgl1-nvidia-alternatives{,-ia32}.
+  * Handle ia32 alternatives of libGL.so* via trigger, too.
   * Update lintian-overrides.
 
  -- Andreas Beckmann <debian at abeckmann.de>  Fri, 20 Aug 2010 23:15:21 -0500

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postinst?rev=1415&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postinst Sat Aug 21 13:43:24 2010
@@ -1,5 +1,26 @@
 #!/bin/sh
 set -e
+
+
+# A trigger that handles the alternatives for /usr/lib32/libGL.so and
+# /usr/lib32/libGL.so.1.
+if [ "$1" = "triggered" ]; then
+
+	if [ -L /usr/lib32/nvidia/diversions/libGL.so.1 ]; then
+		update-alternatives --install /usr/lib32/libGL.so.1 ia32-libGL.so.1 /usr/lib32/nvidia/diversions/libGL.so.1 5
+	else
+		update-alternatives --remove ia32-libGL.so.1 /usr/lib32/nvidia/diversions/libGL.so.1
+	fi
+
+	if [ -L /usr/lib32/nvidia/diversions/libGL.so ]; then
+		# libgl-mesa-dev was installed, create libGL.so
+		update-alternatives --install /usr/lib32/libGL.so ia32-libGL.so /usr/lib32/nvidia/diversions/libGL.so 9995
+	else
+		# libgl-mesa-dev was removed, drop libGL.so
+		update-alternatives --remove ia32-libGL.so /usr/lib32/nvidia/diversions/libGL.so
+	fi
+
+fi
 
 
 #DIVERT_QUIET="--quiet"
@@ -56,6 +77,13 @@
 if [ "$1" = "configure" ]
 then
 
+	# <target: squeeze>
+	# The old nvidia-glx-ia32 postrm would delete /usr/lib32/nvidia/diversions
+	# out from under us, so create it if it doesn't exist.
+	test -d /usr/lib32/nvidia/diversions || \
+		mkdir -p /usr/lib32/nvidia/diversions
+	# </target: squeeze>
+
 	# make new diversions
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/diversions/libGL.so \
@@ -72,8 +100,9 @@
 
 if [ "$1" = "configure" ]; then
 
-	update-alternatives --install /usr/lib32/libGL.so.1 ia32-libGL.so.1 /usr/lib32/nvidia/diversions/libGL.so.1 5
-	update-alternatives --install /usr/lib32/libGL.so ia32-libGL.so /usr/lib32/nvidia/diversions/libGL.so 9995
+	# activate our trigger
+	dpkg-trigger /usr/lib32/libGL.so.1
+	dpkg-trigger /usr/lib32/libGL.so
 
 fi
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postrm?rev=1415&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.postrm Sat Aug 21 13:43:24 2010
@@ -10,9 +10,6 @@
 # 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.
 #
@@ -21,9 +18,9 @@
 # diversions and doesn't want us messing with them.
 
 case "$1" in
-    remove|abort-install)
+    remove)
 
-	# restore libGL.so* from ia32-libs, diverted to /usr/lib32/nvidia
+	# restore libGL.so* from ia32-libs, diverted to /usr/lib32/nvidia/diversions
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib32/nvidia/diversions/libGL.so.1.2 \
 		/usr/lib32/libGL.so.1.2

Added: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.triggers
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.triggers?rev=1415&op=file
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.triggers (added)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives-ia32.triggers Sat Aug 21 13:43:24 2010
@@ -1,0 +1,4 @@
+interest /usr/lib32/libGL.so.1
+interest /usr/lib32/libGL.so
+interest /usr/lib32/nvidia/diversions/libGL.so.1
+interest /usr/lib32/nvidia/diversions/libGL.so

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst?rev=1415&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst Sat Aug 21 13:43:24 2010
@@ -88,10 +88,13 @@
 
 if [ "$1" = "configure" ]
 then
+
+	# <target: squeeze>
 	# The old nvidia-glx postrm would delete /usr/lib/nvidia/diversions
 	# out from under us, so create it if it doesn't exist.
 	test -d /usr/lib/nvidia/diversions || \
 		mkdir -p /usr/lib/nvidia/diversions
+	# </target: squeeze>
 
 	# make new diversions
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postrm?rev=1415&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postrm Sat Aug 21 13:43:24 2010
@@ -10,12 +10,6 @@
 # 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.
-#
-# Remove /usr/lib/libGL.so only if we still own a diversion of it, since the
-# link may have been created by our trigger in postinst or later.
-#
 # 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.
 #
@@ -23,10 +17,10 @@
 # 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
+    remove)
 
-case "$1" in
-    remove|abort-install)
-
+	# restore libGL.so* from libgl1-mesa-{glx,dev}, diverted to /usr/lib/nvidia/diversions
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
 		/usr/lib/nvidia/diversions/libGL.so.1.2 \
 		/usr/lib/libGL.so.1.2




More information about the Pkg-nvidia-devel mailing list