Merge remote-tracking branch 'origin/main'

This commit is contained in:
lotherk committed 2026-11-22 19:09:32 +01:00
commit 272217f0ea
1 file changed
+20
+20
View File
@@ -71,6 +71,26 @@ sandbox_mount()
# and the sysinst repository see one directory on either host
mount | grep -q " on $MNT/packages " ||
mount -t null "$TOP/build/packages" "$MNT/packages"
# The file index beside the package database is a cache, and pkg_add
# trusts it blindly: after a `force' run removed packages, the index still
# named digest-20220214 as the owner of /usr/pkg/bin/digest -- a package
# that was not registered and a file that did not exist. pkg_add then
# reported "digest-20220214: conflicting PLIST with digest-20220214" when
# bootstrapping digest itself, and every build that needed a tool from the
# sysroot stopped (measured 2026-11-22: tools/pkgchroot.sh force wm/mcde
# left 45 packages deleted and could not reinstall any of them).
sandbox_index
}
# Rebuild the by-file index from the +CONTENTS of the installed packages, so it
# can only name packages that are registered. pkg_admin lives in the sysroot
# (/usr/sbin, part of a base set since the package tools moved there); the
# sysroot's own copy is used so the index format matches the pkg_add inside.
sandbox_index()
{
[ -x "$D/usr/sbin/pkg_admin" ] || return 0
chroot "$D" /usr/sbin/pkg_admin -K /usr/pkg/pkgdb rebuild >/dev/null 2>&1 ||
echo "pkgchroot: rebuild of pkgdb.byfile.db failed" >&2
}
# The base bmake does not read MAKECONF, and a mk.conf in the sysroot's /etc