[pkg-nvidia-devel] r1292 - /packages/nvidia-graphics-drivers/trunk/debian/libgl1-nvidia-glx.preinst

Russ Allbery rra at debian.org
Sun Jul 4 17:45:03 UTC 2010

anbe-guest at users.alioth.debian.org writes:

> +	# <target: squeeze>
> +	# remove libGL.so created by obsolete nvidia-glx* init script
> +	# otherwise we dpkg-divert --rename an unowned file
> +	if [ -L /usr/lib/libGL.so ] && [ ! -d /usr/share/doc/libgl1-mesa-dev ]
> +	then
> +		echo "Removing inappropriate /usr/lib/libGL.so"
> +		rm -f /usr/lib/libGL.so
> +	fi
> +	# </target: squeeze>

Unfortunately, you can't assume that the /usr/share/doc directory for a
package exists when the package is installed.  The scenarios where it's
not are probably unlikely in our case, but Debian permits rm -rf of
/usr/share/doc (for disk space on embedded systems, for example), and
everything is required to keep working.

Can we instead check somehow (perhaps with readlink) whether the libGL.so
link is pointing to the NVIDIA library and remove it if that's the case?

Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>

More information about the Pkg-nvidia-devel mailing list