Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > main-testing > by-pkgid > b5c773643b50f30713115372cc8f03c0 > scriptlet

x11-server-common-1.6.1-5.6mdv2009.1.x86_64.rpm

PREIN

/bin/sh
for link in /etc/X11 /usr/lib/X11 /usr/X11R6; do
	if [ -L $link ]; then
		echo "$link is a symbolic link. You must run the"
		echo "script in http://wiki.mandriva.com/en/CookerX11Upgrade"
		echo "before continuing."
		exit 1
	fi
done

if [ -L /usr/lib64/X11 ]; then 
	rm -f /usr/lib64/X11
fi
if [ -d /usr/X11R6/lib/X11 ]; then
	mkdir -p /usr/lib64/X11
	rm -f /usr/X11R6/lib/X11/fs # old symlink, already on the target dir
	mv -f /usr/X11R6/lib/X11/* /usr/lib64/X11/ 2> /dev/null
	rm -rf /usr/X11R6/lib/X11
fi

POSTIN

/bin/sh
/usr/sbin/update-alternatives \
	--install /etc/ld.so.conf.d/GL.conf gl_conf /etc/ld.so.conf.d/GL/standard.conf 500 \
	--slave /usr/lib64/xorg/extra-modules xorg_extra_modules /usr/lib64/xorg/xorg-1.6-extra-modules

# (anssi)

POSTUN

/bin/sh
if [ ! -f /etc/ld.so.conf.d/GL/standard.conf ]; then
	/usr/sbin/update-alternatives --remove gl_conf /etc/ld.so.conf.d/GL/standard.conf
fi

Triggers

x11-server-common < 1.3.0.0-17

/bin/sh
[ $1 -eq 2 ] || exit 0 # do not run if downgrading
current_glconf="$(readlink -e /etc/ld.so.conf.d/GL.conf)"
if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then
	# This an upgrade of a system with no proprietary drivers enabled, update
	# the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change).
	/usr/sbin/update-alternatives --set gl_conf /etc/ld.so.conf.d/GL/standard.conf
else
	# XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here.
	/usr/sbin/update-alternatives --set gl_conf "${current_glconf}"
fi
true