postinst is in apt-xapian-index 0.44ubuntu5.
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #!/bin/sh -e
# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
pycompile -p apt-xapian-index
fi
if which pycompile >/dev/null 2>&1; then
pycompile -p apt-xapian-index /usr/share/apt-xapian-index -V 2.4-
fi
# End automatically added section
# ionice should not be called in a virtual environment
# (similar to man-db cronjobs)
if [ -x /usr/bin/ionice ] && ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status
then
IONICE="/usr/bin/ionice -c3"
else
IONICE=""
fi
case "$1" in
configure)
# Just checking the main directory with -d should prevent the indexing
# to be started while an indexing is already going on, as the first
# thing that update-apt-xapian-index does is to create the directory if
# it is missing
#
# we also full-regenerate the index on upgrades from older versions
# because the weekly --update cron job will not use new plugins for
# already indexed packages
if [ ! -d /var/lib/apt-xapian-index ] || dpkg --compare-versions "$2" lt-nl "0.39"
then
if [ ! -x /usr/sbin/policy-rc.d ] || /usr/sbin/policy-rc.d apt-xapian-index start
then
echo "apt-xapian-index: Building new index in background..."
$IONICE nice /usr/sbin/update-apt-xapian-index --force --quiet &
fi
fi
;;
esac
exit 0
|