preinst is in libgbm1-lts-xenial 11.2.0-1ubuntu2~trusty2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/bin/sh -e
set -e
dir=/usr/lib/x86_64-linux-gnu
pkg=$(dpkg-divert --listpackage "${dir}/libgbm.so.1.0.0")
if [ -n "${pkg}" -a "${pkg}" != "libgbm1-lts-xenial" ]; then
dpkg-divert --remove --package ${pkg} --rename \
--divert "${dir}/old.libgbm.so.1.0.0" "${dir}/libgbm.so.1.0.0"
dpkg-divert --remove --package ${pkg} --rename \
--divert "${dir}/old.libgbm.so.1" "${dir}/libgbm.so.1"
dpkg-divert --remove --package ${pkg} --rename \
--divert "${dir}/gbm/old.gbm_gallium_drm.so" "${dir}/gbm/gbm_gallium_drm.so"
pkg=""
fi
if [ -z "${pkg}" ]; then
dpkg-divert --add --package "libgbm1-lts-xenial" --rename \
--divert "${dir}/old.libgbm.so.1.0.0" "${dir}/libgbm.so.1.0.0"
dpkg-divert --add --package "libgbm1-lts-xenial" --rename \
--divert "${dir}/old.libgbm.so.1" "${dir}/libgbm.so.1"
dpkg-divert --add --package "libgbm1-lts-xenial" --rename \
--divert "${dir}/gbm/old.gbm_gallium_drm.so" "${dir}/gbm/gbm_gallium_drm.so"
fi
exit 0
|