Sophie

Sophie

distrib > Mageia > 8 > i586 > media > nonfree-updates > by-pkgid > 82199cc715683a196862d756e23f553c > scriptlet

x11-driver-video-nvidia390-390.151-2.mga8.nonfree.i586.rpm

POSTIN

/bin/sh
# XFdrake used to generate an nvidia.conf file
[ -L /etc/modprobe.d/nvidia.conf ] || rm -f /etc/modprobe.d/nvidia.conf

# remove cuda-specific ld conf to not conflict with alternatives
rm -f /etc/ld.so.conf.d/nvidia390-cuda.conf

current_glconf="$(readlink -e /etc/ld.so.conf.d/GL.conf)"

/usr/sbin/update-alternatives \
	--install /etc/ld.so.conf.d/GL.conf gl_conf /etc/nvidia390/ld.so.conf 9670 \
	--slave /etc/X11/xinit.d/nvidia-settings.xinit nvidia-settings.xinit /etc/nvidia390/nvidia-settings.xinit \
	--slave /etc/modprobe.d/display-driver.conf display-driver.conf /etc/nvidia390/modprobe.conf

POSTUN

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

POSTTRANS

/bin/sh
# When upgrading 340 => 346, the alternativeszification of /usr/share/nvidia may
# cause uninstallation of 340 (during upgrade) to remove these files through
# the /usr/share/nvidia symlink. Restore them.
for file in /usr/share/nvidia390/pci.ids /usr/share/nvidia390/monitoring.conf; do
	backupfile="/usr/share/nvidia390/$(basename "$file").mga"
	if ! [ -e $file ] && [ -e "$backupfile" ]; then
		ln -T "$backupfile" "$file"
	fi
done
# update-alternatives from older packages might remove libvdpau_nvidia.so.1 links, restore them
if [ ! -e /usr/lib/vdpau/libvdpau_nvidia.so.1 ]; then
	ln -sf /usr/lib/vdpau/libvdpau_nvidia.so.390.151 /usr/lib/vdpau/libvdpau_nvidia.so.1
	ln -sf /usr/lib/vdpau/libvdpau_nvidia.so.390.151 /usr/lib/vdpau/libvdpau_nvidia.so.1
fi