[pkg-nvidia-devel] r1433 - in /packages/nvidia-graphics-drivers/trunk/debian: changelog libgl1-nvidia-alternatives.postinst

anbe-guest at users.alioth.debian.org anbe-guest at users.alioth.debian.org
Fri Aug 27 00:04:12 UTC 2010


Author: anbe-guest
Date: Fri Aug 27 00:04:11 2010
New Revision: 1433

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=1433
Log:
validate the diverted libGL.so.1 symlink

Modified:
    packages/nvidia-graphics-drivers/trunk/debian/changelog
    packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst

Modified: packages/nvidia-graphics-drivers/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/changelog?rev=1433&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/changelog (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/changelog Fri Aug 27 00:04:11 2010
@@ -2,6 +2,7 @@
 
   [ Andreas Beckmann ]
   * Remove workaround for dpkg-divert bug #581544, fixed in dpkg 1.15.8.
+  * Validate the diverted libGL.so.1 symlink.  (Closes: #594416)
   * Change handling of Xorg module libglx.so to use alternatives, too.  Move
     the diversion of libglx.so to new package libglx-nvidia-alternatives and
     use a trigger there to create the alternatives.  (Closes: #594299)

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=1433&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-alternatives.postinst Fri Aug 27 00:04:11 2010
@@ -142,6 +142,34 @@
 	fi
 	# </target: squeeze>
 
+	# <target: squeeze>
+	# do some validation of the diverted libGL.so.1
+
+	# check ownership of the original libGL.so.1
+	libGLso1="$(dpkg-query -S /usr/lib/libGL.so.1 2>/dev/null | grep -v '^diversion by' || true)"
+
+	if [ -L /usr/lib/nvidia/diversions/libGL.so.1 ] && \
+		[ -z "$libGLso1" ]
+	then
+		echo "Removing diverted libGL.so.1 symlink owned by no package."
+		rm /usr/lib/nvidia/diversions/libGL.so.1
+	fi
+
+	if [ -L /usr/lib/nvidia/diversions/libGL.so.1 ] && \
+		[ "`readlink /usr/lib/nvidia/diversions/libGL.so.1`" != "libGL.so.1.2" ]
+	then
+		echo "Removing diverted libGL.so.1 symlink with unexpected target."
+		rm /usr/lib/nvidia/diversions/libGL.so.1
+	fi
+
+	if [ ! -L /usr/lib/nvidia/diversions/libGL.so.1 ] && \
+		[ -n "$libGLso1" ]
+	then
+		echo "Restoring diverted libGL.so.1 symlink."
+		ln -s libGL.so.1.2 /usr/lib/nvidia/diversions/libGL.so.1
+	fi
+	# </target: squeeze>
+
 fi
 # </target: squeeze>
 




More information about the Pkg-nvidia-devel mailing list