echo "ERROR: DPKG_MAINTSCRIPT_PACKAGE is not set, usually a bug in dpkg-reconfigure"
exit 1
fi
case "$DPKG_MAINTSCRIPT_PACKAGE" in
xserver-xorg-video*)
libdir="/usr/lib/xorg/modules/extensions"
pattern="libglx.so.*"
;;
*-ia32*)
libdir="/usr/lib32"
pattern="libGL.so.*.*"
;;
*)
libdir="/usr/lib"
pattern="libGL.so.*.*"
;;
esac
CONFLICT_LIBS=""
for f in "$libdir"/$pattern "$libdir"/i386-linux-gnu/$pattern "$libdir"/x86_64-linux-gnu/$pattern "$libdir"/arm-linux-gnueabihf/$pattern /usr/lib32/libGL.so*
do
if [ -e "$f" ] || [ -L "$f" ]
then
if dpkg-query -S "$f" >/dev/null 2>&1
then
echo "ERROR: The conflicting library '$f' is known to dpkg." >&2