rendered paste body#! /bin/sh -e
#
# postinst script for the Debian python2.4-base package.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#
# remove unconditionally
update-alternatives --remove python /usr/bin/python2.4 || true
if [ "$1" = configure ]; then
(
cd /usr/lib/python2.4
files=$(dpkg -L python2.4 | sed -n '/\.py$/s,^/usr/lib/python2.4/,,p')
/usr/bin/python2.4 /usr/lib/python2.4/py_compile.py $files
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
/usr/bin/python2.4 -O /usr/lib/python2.4/py_compile.py $files
fi
)
fi
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
# Create empty directories in /usr/local
if [ ! -e /usr/local/lib/python2.4 ]; then
mkdir -p /usr/local/lib/python2.4 2> /dev/null || true
chmod 2775 /usr/local/lib/python2.4 2> /dev/null || true
chown root:staff /usr/local/lib/python2.4 2> /dev/null || true
fi
if [ ! -e /usr/local/lib/python2.4/site-packages ]; then
mkdir -p /usr/local/lib/python2.4/site-packages 2> /dev/null || true
chmod 2775 /usr/local/lib/python2.4/site-packages 2> /dev/null || true
chown root:staff /usr/local/lib/python2.4/site-packages 2> /dev/null || true
fi
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
ldconfig
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
# Automatically added by dh_desktop
if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then
update-desktop-database -q
fi
# End automatically added section
exit 0