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

anbe-guest at users.alioth.debian.org anbe-guest at users.alioth.debian.org
Sun Jul 4 14:10:07 UTC 2010


Author: anbe-guest
Date: Sun Jul  4 14:09:59 2010
New Revision: 1289

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=1289
Log:
Move diversions to /usr/lib{,32}/nvidia/diversions

Modified:
    packages/nvidia-graphics-drivers/trunk/debian/changelog
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.dirs
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.links.in
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.lintian-overrides.in
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.postrm
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.preinst
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.dirs
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.lintian-overrides.in
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postinst
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postrm
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.dirs
    packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.lintian-overrides.in

Modified: packages/nvidia-graphics-drivers/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/changelog?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/changelog (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/changelog Sun Jul  4 14:09:59 2010
@@ -28,6 +28,7 @@
     will be dropped from the package name.
   * Update lintian-overrides and minor cleanup of the packaging scripts.
   * Clean up more carefully after the module build.
+  * Move diversions to /usr/lib{,32}/nvidia/diversions.
 
  -- Andreas Beckmann <debian at abeckmann.de>  Wed, 23 Jun 2010 08:33:44 +0200
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.dirs
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.dirs?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.dirs (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.dirs Sun Jul  4 14:09:59 2010
@@ -1,1 +1,1 @@
-usr/lib32/nvidia
+usr/lib32/nvidia/diversions

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.links.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.links.in?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.links.in (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.links.in Sun Jul  4 14:09:59 2010
@@ -3,4 +3,4 @@
 usr/lib32/libGLcore.so.#VERSION#		usr/lib32/libGLcore.so.1
 usr/lib32/libnvidia-tls.so.#VERSION#		usr/lib32/libnvidia-tls.so.1
 usr/lib32/tls/libnvidia-tls.so.#VERSION#	usr/lib32/tls/libnvidia-tls.so.1
-usr/lib32/nvidia/libGL.so.1.2.ia32-libs		usr/lib32/libGL.so
+usr/lib32/nvidia/diversions/libGL.so		usr/lib32/libGL.so

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.lintian-overrides.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.lintian-overrides.in?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.lintian-overrides.in (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.lintian-overrides.in Sun Jul  4 14:09:59 2010
@@ -4,6 +4,9 @@
 libgl1-nvidia#LEGACY#-glx-ia32: shlib-with-non-pic-code
 libgl1-nvidia#LEGACY#-glx-ia32: shlib-without-PT_GNU_STACK-section
 libgl1-nvidia#LEGACY#-glx-ia32: spelling-error-in-binary
+
+# The diversions are placed here.
+libgl1-nvidia#LEGACY#-glx-ia32: package-contains-empty-directory usr/lib32/nvidia/diversions/
 
 # We divert the original /usr/lib32/libGL.so symlink.
 # In order to retain its functionality (i.e. pointing the MESA libGL.so.1)

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.postrm?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.postrm Sun Jul  4 14:09:59 2010
@@ -25,17 +25,16 @@
 
 	# restore libGL.so* from ia32-libs, diverted to /usr/lib32/nvidia
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.ia32-libs \
-		/usr/lib32/libGL.so
+		/usr/lib32/nvidia/diversions/libGL.so.1.2 \
+		/usr/lib32/libGL.so.1.2
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.1.ia32-libs \
+		/usr/lib32/nvidia/diversions/libGL.so.1 \
 		/usr/lib32/libGL.so.1
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.1.2.ia32-libs \
-		/usr/lib32/libGL.so.1.2
+		/usr/lib32/nvidia/diversions/libGL.so \
+		/usr/lib32/libGL.so
 
-	test ! -d /usr/lib32/nvidia || \
-		rmdir /usr/lib32/nvidia || true;
+	rmdir /usr/lib32/nvidia/diversions /usr/lib32/nvidia 2>/dev/null || true
 
     ;;
 esac

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.preinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.preinst?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.preinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx-ia32.preinst Sun Jul  4 14:09:59 2010
@@ -4,40 +4,63 @@
 
 #DIVERT_QUIET="--quiet"
 
+exists()
+{
+	test -e "$1" || test -L "$1"
+}
+
 case "$1" in
     install|upgrade)
 
 	# the destination directory for the diversions
-	test -d /usr/lib32/nvidia || \
-		mkdir -p /usr/lib32/nvidia || true
+	test -d /usr/lib32/nvidia/diversions || \
+		mkdir -p /usr/lib32/nvidia/diversions || true
 
 	# <target: squeeze>
-	# migrate diversions from nvidia-glx-ia32
-	for file in libGL.so libGL.so.1 libGL.so.1.2
+	# take over diversions from nvidia-glx{,-legacy-*xx}-ia32
+	for file in libGL.so.1.2 libGL.so.1 libGL.so
 	do
-		old_diverter="`dpkg-divert --listpackage /usr/lib32/$file`"
+		file_orig="/usr/lib32/$file"
+		file_old_divert="/usr/lib32/nvidia/$file.ia32-libs"
+		file_new_divert="/usr/lib32/nvidia/diversions/$file"
+		old_diverter="`dpkg-divert --listpackage $file_orig`"
+
 		if [ -n "$old_diverter" ] \
 			&& [ "$old_diverter" != "$DPKG_MAINTSCRIPT_PACKAGE" ]
 		then
-			dpkg-divert --remove --package $old_diverter --divert \
-				/usr/lib32/nvidia/$file.ia32-libs \
-				/usr/lib32/$file
-			dpkg-divert --add --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-				/usr/lib32/nvidia/$file.ia32-libs \
-				/usr/lib32/$file
+			if ! exists "$file_orig" || ! exists "$file_old_divert"
+			then
+				dpkg-divert --remove --rename --package $old_diverter --divert \
+					"$file_old_divert" \
+					"$file_orig"
+			else
+				dpkg-divert --remove --package $old_diverter --divert \
+					"$file_old_divert" \
+					"$file_orig"
+				echo "Moving $file_old_divert to $file_new_divert"
+				mv "$file_old_divert" "$file_new_divert"
+				dpkg-divert --add --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
+					"$file_new_divert" \
+					"$file_orig"
+			fi
+		fi
+		if exists "$file_old_divert"
+		then
+			echo "ERROR: $file_old_divert does still exist. Aborting."
+			exit 1
 		fi
 	done
 	# </target: squeeze>
 
-	# divert libGL.so* from ia32-libs to /usr/lib32/nvidia
+	# make new diversions
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.ia32-libs \
+		/usr/lib32/nvidia/diversions/libGL.so \
 		/usr/lib32/libGL.so
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.1.ia32-libs \
+		/usr/lib32/nvidia/diversions/libGL.so.1 \
 		/usr/lib32/libGL.so.1
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib32/nvidia/libGL.so.1.2.ia32-libs \
+		/usr/lib32/nvidia/diversions/libGL.so.1.2 \
 		/usr/lib32/libGL.so.1.2
 
     ;;

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.dirs
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.dirs?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.dirs (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.dirs Sun Jul  4 14:09:59 2010
@@ -1,1 +1,1 @@
-usr/lib/nvidia
+usr/lib/nvidia/diversions

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.lintian-overrides.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.lintian-overrides.in?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.lintian-overrides.in (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.lintian-overrides.in Sun Jul  4 14:09:59 2010
@@ -7,7 +7,7 @@
 libgl1-nvidia#LEGACY#-glx: spelling-error-in-binary
 
 # The diversions are placed here.
-libgl1-nvidia#LEGACY#-glx: package-contains-empty-directory usr/lib/nvidia/
+libgl1-nvidia#LEGACY#-glx: package-contains-empty-directory usr/lib/nvidia/diversions/
 
 # Packages built against the NVIDIA libGL should declare dependencies on
 # the free version for Debian's purposes.  Therefore we use a special

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postinst?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postinst Sun Jul  4 14:09:59 2010
@@ -5,8 +5,8 @@
 # A trigger that handles creating/removing /usr/lib/libGL.so
 if [ "$1" = "triggered" ]; then
 	LINK_origin=/usr/lib/libGL.so
-	LINK_diverted=/usr/lib/nvidia/libGL.so.xlibmesa
-	LINK_create=nvidia/libGL.so.1.2.xlibmesa
+	LINK_diverted=/usr/lib/nvidia/diversions/libGL.so
+	LINK_create=nvidia/diversions/libGL.so
 
 	if [ -L "$LINK_origin" ] && [ ! -L "$LINK_diverted" ]; then
 		# libgl-mesa-dev was removed, drop libGL.so

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postrm
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postrm?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postrm (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.postrm Sun Jul  4 14:09:59 2010
@@ -34,17 +34,16 @@
 	fi
 
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.1.xlibmesa \
+		/usr/lib/nvidia/diversions/libGL.so.1.2 \
+		/usr/lib/libGL.so.1.2
+	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
+		/usr/lib/nvidia/diversions/libGL.so.1 \
 		/usr/lib/libGL.so.1
 	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.1.2.xlibmesa \
-		/usr/lib/libGL.so.1.2
-	dpkg-divert $DIVERT_QUIET --remove --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.xlibmesa \
+		/usr/lib/nvidia/diversions/libGL.so \
 		/usr/lib/libGL.so
 
-	test ! -d /usr/lib/nvidia || \
-		rmdir /usr/lib/nvidia || true;
+	rmdir /usr/lib/nvidia/diversions /usr/lib/nvidia 2>/dev/null || true
 
     ;;
 esac

Modified: packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst Sun Jul  4 14:09:59 2010
@@ -4,41 +4,64 @@
 
 #DIVERT_QUIET="--quiet"
 
+exists()
+{
+	test -e "$1" || test -L "$1"
+}
+
 case "$1" in
     install|upgrade)
 
 	# the destination directory for the diversions
-	test -d /usr/lib/nvidia || \
-		mkdir -p /usr/lib/nvidia || true
+	test -d /usr/lib/nvidia/diversions || \
+		mkdir -p /usr/lib/nvidia/diversions || true
 
 	# <target: squeeze>
-	# migrate diversions from nvidia-glx
-	for file in libGL.so libGL.so.1 libGL.so.1.2
+	# take over diversions from nvidia-glx{,-legacy-*xx}
+	for file in libGL.so.1.2 libGL.so.1 libGL.so
 	do
-		old_diverter="`dpkg-divert --listpackage /usr/lib/$file`"
+		file_orig="/usr/lib/$file"
+		file_old_divert="/usr/lib/nvidia/$file.xlibmesa"
+		file_new_divert="/usr/lib/nvidia/diversions/$file"
+		old_diverter="`dpkg-divert --listpackage $file_orig`"
+
 		if [ -n "$old_diverter" ] \
 			&& [ "$old_diverter" != "$DPKG_MAINTSCRIPT_PACKAGE" ]
 		then
-			dpkg-divert --remove --package $old_diverter --divert \
-				/usr/lib/nvidia/$file.xlibmesa \
-				/usr/lib/$file
-			dpkg-divert --add --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-				/usr/lib/nvidia/$file.xlibmesa \
-				/usr/lib/$file
+			if ! exists "$file_orig" || ! exists "$file_old_divert"
+			then
+				dpkg-divert --remove --rename --package $old_diverter --divert \
+					"$file_old_divert" \
+					"$file_orig"
+			else
+				dpkg-divert --remove --package $old_diverter --divert \
+					"$file_old_divert" \
+					"$file_orig"
+				echo "Moving $file_old_divert to $file_new_divert"
+				mv "$file_old_divert" "$file_new_divert"
+				dpkg-divert --add --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
+					"$file_new_divert" \
+					"$file_orig"
+			fi
+		fi
+		if exists "$file_old_divert"
+		then
+			echo "ERROR: $file_old_divert does still exist. Aborting."
+			exit 1
 		fi
 	done
 	# </target: squeeze>
 
 	# make new diversions
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.1.xlibmesa \
+		/usr/lib/nvidia/diversions/libGL.so \
+		/usr/lib/libGL.so
+	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
+		/usr/lib/nvidia/diversions/libGL.so.1 \
 		/usr/lib/libGL.so.1
 	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.1.2.xlibmesa \
+		/usr/lib/nvidia/diversions/libGL.so.1.2 \
 		/usr/lib/libGL.so.1.2
-	dpkg-divert $DIVERT_QUIET --add --rename --package $DPKG_MAINTSCRIPT_PACKAGE --divert \
-		/usr/lib/nvidia/libGL.so.xlibmesa \
-		/usr/lib/libGL.so
 
     ;;
 esac

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.dirs
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.dirs?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.dirs (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.dirs Sun Jul  4 14:09:59 2010
@@ -1,1 +1,1 @@
-usr/lib/nvidia
+usr/lib/nvidia/diversions

Modified: packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.lintian-overrides.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.lintian-overrides.in?rev=1289&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.lintian-overrides.in (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/nvidia-glx.lintian-overrides.in Sun Jul  4 14:09:59 2010
@@ -6,7 +6,7 @@
 #!amd64#nvidia-glx#LEGACY#: shlib-without-PT_GNU_STACK-section
 
 # The diversions are placed here.
-nvidia-glx#LEGACY#: package-contains-empty-directory usr/lib/nvidia/
+nvidia-glx#LEGACY#: package-contains-empty-directory usr/lib/nvidia/diversions/
 
 # Referenced by upstream documentation.
 nvidia-glx#LEGACY#: script-with-language-extension usr/bin/nvidia-bug-report.sh




More information about the Pkg-nvidia-devel mailing list