slackware-current/source/ap/man-db/doinst.sh
Patrick J Volkerding 646a5c1cbf Mon May 28 19:12:29 UTC 2018
a/pkgtools-15.0-noarch-13.txz:  Rebuilt.
  installpkg: default line length for --terselength is the number of columns.
  removepkg: added --terse mode.
  upgradepkg: default line length for --terselength is the number of columns.
  upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz:  Upgraded.
d/bison-3.0.5-x86_64-1.txz:  Upgraded.
e/emacs-26.1-x86_64-1.txz:  Upgraded.
kde/kopete-4.14.3-x86_64-8.txz:  Rebuilt.
  Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz:  Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz:  Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz:  Upgraded.
n/links-2.16-x86_64-2.txz:  Rebuilt.
  Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz:  Upgraded.
n/nftables-0.8.5-x86_64-1.txz:  Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz:  Upgraded.
n/ulogd-2.0.7-x86_64-1.txz:  Upgraded.
n/whois-5.3.1-x86_64-1.txz:  Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz:  Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz:  Upgraded.
2018-05-31 23:39:35 +02:00

54 lines
2.2 KiB
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/man_db.conf.new
# Slackware change: commenting the stuff below out. We're not going to
# generate a database during a package installation... especially since
# it appears that it only provides "whatis" services. The rest of the
# manpage system works fine without it. So, people can wait until the
# first time the cron job runs (or root can run it manually), just like
# "locate" has been handled forever.
## In English, the if/find below means "only run the database creation if
## it was last done over an hour ago". This is needed because upgradepkg
## runs doinst.sh twice, but I don't want the 10+ minute long database
## creation to happen twice on upgrade (or at all, when I'm repeatedly
## reinstalling man-db for testing purposes).
#
#if \
# [ ! -e /var/cache/man/man-db ] || \
# [ -n "$( find var/cache/man/ -type d -a -name man-db -a -mmin +60 )" ]
#then
## Generate the initial man database (or rebuild it if it exists).
## We want to skip this step if installing somewhere besides / (e.g. with
## the -root option or ROOT env variable set for installpkg), hence the
## readlink silliness.
#
## The -c option means it blows away any existing db. I thought about
## leaving it off (it will still create the db if it doesn't exist),
## but decided it's better to build it fresh if the package gets
## reinstalled (in case the db format has changed, or in case the
## db is corrupted and the user is trying to fix it by reinstalling
## this package).
#
## the 2>/dev/null was added for 2.7.6 because it complains about
## missing CACHEDIR.TAG files... which don't matter, because we've
## got NOCACHE in the config file.
# ( \
# [ -x /bin/readlink ] && \
# [ "$( /bin/readlink -f $( pwd ) )" = "/" ] && \
# ( [ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb -c -q ) || \
# ( [ -x /usr/bin/mandb ] && /usr/bin/mandb -c -q ) \
# ) 2>/dev/null
#fi