Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/freebsd-update/freebsd-update.sh
Show First 20 Lines • Show All 2,937 Lines • ▼ Show 20 Lines | if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || | ||||
pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd | pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd | ||||
fi | fi | ||||
# Rebuild /etc/login.conf.db if necessary. | # Rebuild /etc/login.conf.db if necessary. | ||||
if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then | if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then | ||||
cap_mkdb ${BASEDIR}/etc/login.conf | cap_mkdb ${BASEDIR}/etc/login.conf | ||||
fi | fi | ||||
# Rebuild man page databases, if necessary. | |||||
for D in /usr/share/man /usr/share/openssl/man; do | |||||
if [ ! -d ${BASEDIR}/$D ]; then | |||||
continue | |||||
fi | |||||
if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then | |||||
continue; | |||||
fi | |||||
makewhatis ${BASEDIR}/$D | |||||
bdrewery: ```
To install the downloaded upgrades, run "/tmp/poudriere.R0QHx4tP/freebsd-update.hRjQjemy… | |||||
bdreweryUnsubmitted Not Done Inline ActionsOddly a new install produced the mandoc.db files but not an update of a 12.0->12.2. bdrewery: Oddly a new install produced the mandoc.db files but not an update of a 12.0->12.2. | |||||
emasteAuthorUnsubmitted Done Inline ActionsThe idea is that if anything in the /usr/share/man or /usr/share/openssl/man directory is newer than mandoc.db we should regenerate mandoc.db. I'm confused by the ls in your sample output, do you know where it's frome? That said I think we ought to check that mandoc.db exists also, something like diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 004515bb8bf8..7f9b06f0221f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2958,7 +2958,8 @@ Kernel updates have been installed. Please reboot and run if [ ! -d ${BASEDIR}/$D ]; then continue fi - if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + if [ -f ${BASEDIR}/$D/mandoc.db ] && \ + [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then continue; fi makewhatis ${BASEDIR}/$D emaste: The idea is that if anything in the /usr/share/man or /usr/share/openssl/man directory is newer… | |||||
done | |||||
# We've finished installing the world and deleting old files | # We've finished installing the world and deleting old files | ||||
# which are not shared libraries. | # which are not shared libraries. | ||||
touch $1/worlddone | touch $1/worlddone | ||||
# Do we need to ask the user to portupgrade now? | # Do we need to ask the user to portupgrade now? | ||||
grep -vE '^/boot/' $1/INDEX-NEW | | grep -vE '^/boot/' $1/INDEX-NEW | | ||||
grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' | | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' | | ||||
cut -f 1 -d '|' | | cut -f 1 -d '|' | | ||||
▲ Show 20 Lines • Show All 395 Lines • Show Last 20 Lines |
...
The logic seems backwards here or unneeded.
Shouldn't my jail get these databases on an update or install?