Page MenuHomeFreeBSD

Fix hand-rolled METALOG entries for installconfig during distributeworld
ClosedPublic

Authored by jrtc27 on Jan 22 2022, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 4:20 PM
Unknown Object (File)
Mar 15 2024, 10:09 AM
Unknown Object (File)
Mar 15 2024, 10:09 AM
Unknown Object (File)
Mar 15 2024, 10:09 AM
Unknown Object (File)
Mar 11 2024, 2:16 PM
Unknown Object (File)
Jan 10 2024, 1:56 AM
Unknown Object (File)
Jan 6 2024, 5:01 PM
Unknown Object (File)
Jan 6 2024, 5:01 PM

Details

Summary

During distributeworld we call distribute on subdirectories, which in
turn calls installconfig. However, this recursive installconfig call
appends the distribution name (in these cases, "base") to DESTDIR. For
install(1) this works fine as its -D argument comes from the top-level
Makefile.inc1, which passes the original DESTDIR, thereby resulting in
the METALOG entry having the distribution name as a prefix representing
its true installed path relative to the root, but for the hand-rolled
entries they do not use install(1) and thus do not have access to what
the original DESTDIR was, resulting in the METALOG missing this prefix.

Thus, pass down the name of the distribution via a new variable DISTBASE
(chosen as Makefile.inc1 already uses that to convey this exact same
information to etc's distrib-dirs during distributeworld) and prepend
this to the handful of manually-generated METALOG entries. For the
installworld case this variable will be empty and so this behaves as
before.

Note that we need to be careful to avoid double slashes in the METALOG;
distributeworld uses find | awk to split the single METALOG up into
multiple dist.meta files, and this relies on the paths in the METALOG
having the exact prefix ./dist (or ./dist/usr/lib/debug).

Diff Detail

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