Page MenuHomeFreeBSD

freebsd-update: improve mandoc db generation
ClosedPublic

Authored by emaste on Apr 4 2021, 8:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 10:13 PM
Unknown Object (File)
Tue, Apr 9, 12:22 AM
Unknown Object (File)
Mar 12 2024, 7:23 AM
Unknown Object (File)
Mar 8 2024, 5:39 AM
Unknown Object (File)
Mar 8 2024, 5:38 AM
Unknown Object (File)
Mar 8 2024, 5:18 AM
Unknown Object (File)
Feb 22 2024, 5:44 AM
Unknown Object (File)
Feb 6 2024, 3:40 AM

Details

Summary

@bdrewery reported a concern with mandoc db generation in D10482. I am not sure exactly what happened, but it does appear that the logic will fail if there is no existing mandoc.db to compare against with find -newer.

$ test -z "$(find . -type f -newer /does/not/exist)" && echo true
find: /does/not/exist: No such file or directory
true

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Apr 4 2021, 8:40 PM
emaste created this revision.
emaste added subscribers: cperciva, secteam.

Unmodified 12.2-p1 to 12.2-p5

root@freebsd-update-12:~ # freebsd-update install
src component not installed, skipped
Installing updates...Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
Scanning //usr/local/share/certs for certificates...
find: ///usr/share/man/mandoc.db: No such file or directory
find: ///usr/share/openssl/man/mandoc.db: No such file or directory
 done.
root@freebsd-update-12:~ # find /usr/share -name mandoc.db
root@freebsd-update-12:~ #

With this patched head version installed as /usr/sbin/freebsd-update:

root@freebsd-update-12:~ # freebsd-update install
src component not installed, skipped
Installing updates...Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
Scanning //usr/local/share/certs for certificates...
 done.
root@freebsd-update-12:~ # find /usr/share -name mandoc.db
/usr/share/openssl/man/mandoc.db
/usr/share/man/mandoc.db
root@freebsd-update-12:~ #

Unmodified 12.2-p1 to 12.2-p5
...
With this patched head version installed as /usr/sbin/freebsd-update:
...

Both of these were run after deleting mandoc.db from a a fresh 12.2-p1, i.e. find / -name mandoc.db -print -delete

This revision is now accepted and ready to land.Apr 5 2021, 2:57 PM
This revision was automatically updated to reflect the committed changes.