Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2021 18:42:36 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 81a1e3f1f755 - stable/13 - freebsd-update: improve mandoc db generation
Message-ID:  <202104131842.13DIga4l057664@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=81a1e3f1f755aea5c3c09f2ad65c420fea97552f

commit 81a1e3f1f755aea5c3c09f2ad65c420fea97552f
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-04-04 00:57:26 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-04-13 18:42:17 +0000

    freebsd-update: improve mandoc db generation
    
    freebsd-update compares the dates on man pages with mandoc.db, and if
    any newer pages are found it regenerates mandoc.db.
    
    Previously, if mandoc.db did not already exist the check failed and
    freebsd-update then failed to create one.  Now, check that mandoc.db
    exists before performing the check for newer pages.
    
    Reported by:    bdrewery (in D10482)
    Reviewed by:    gordon
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D29575
    
    (cherry picked from commit 741223a65cd1752360c44341b762295f633e21cf)
---
 usr.sbin/freebsd-update/freebsd-update.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104131842.13DIga4l057664>