pkgchroot, userland: a repository package is built, not installed
In the chroot path every package of packages.list went through 'install', which keeps an old registration and builds no archive: build/packages/All held 64 packages and none of the five the media's repository names, so make_repo said 'no package for: junction-0.1 wikid-0.1 ...' and the release stopped. The target is now per package, as the cross path already had it. build-lock: the nested path (make release -> sourcesets -> build-lock) ran sh -c without dropping MAKEFLAGS, so step 5 hit the same read-only .MAKE.LEVEL.ENV as step 4 did.
This commit is contained in:
1 parent
69b475c4ea
commit
7f74532130
3 files changed
+25
-3
No files matched your search
@@ -78,6 +78,7 @@ esac
|
||||
# A nested call (make cdtest -> make release, or a tool started by the lock)
|
||||
# already runs inside the lock.
|
||||
if [ -n "${BUILD_LOCK_HELD:-}" ] && [ -d "$BUILD_LOCK_HELD" ]; then
|
||||
unset MAKEFLAGS MAKELEVEL MFLAGS
|
||||
sh -c "$1"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
+12
-2
@@ -194,10 +194,20 @@ umount) umount_all ;;
|
||||
mount) sandbox_mount; echo "pkgchroot: mounted" ;;
|
||||
build)
|
||||
shift
|
||||
# The target comes first: a package of the "makronix" set is installed
|
||||
# into the sysroot (install, the default), a package of the media's
|
||||
# repository is built as a binary package (package) -- tools/userland.sh
|
||||
# passes it, because `install' keeps an old registration and builds no
|
||||
# archive, so build/packages/All stayed empty and make_repo had nothing
|
||||
# to put on the media (measured 2026-11-23 on the MacBook).
|
||||
tgt=install
|
||||
case ${1:-} in
|
||||
install|package) tgt=$1; shift ;;
|
||||
esac
|
||||
sandbox_mount
|
||||
trap 'umount_all' EXIT INT TERM HUP
|
||||
for p in "$@"; do
|
||||
echo "=== pkgchroot: $p"
|
||||
echo "=== pkgchroot: $p ($tgt)"
|
||||
# A rebuilt package must replace its registration: pkg_add only
|
||||
# compares names, and the same name is what a changed recipe and a
|
||||
# new archive produce. The old version goes before the install, the
|
||||
@@ -211,7 +221,7 @@ build)
|
||||
[ -n "$pn" ] && chroot "$D" /usr/sbin/pkg_delete -f \
|
||||
-K /usr/pkg/pkgdb "$pn" > /dev/null 2>&1 || true
|
||||
fi
|
||||
sandbox_run "$p" install
|
||||
sandbox_run "$p" "$tgt"
|
||||
done
|
||||
sandbox_clean
|
||||
echo "pkgchroot: packages in build/packages/All"
|
||||
|
||||
+12
-1
@@ -560,10 +560,21 @@ phase "host tools"
|
||||
ensure_mk_key
|
||||
failed=
|
||||
if [ $MODE = chroot ]; then
|
||||
# Two targets, the same split the cross path makes: a package of the
|
||||
# "makronix" set is installed into the sysroot, a package of the media's
|
||||
# repository is built as a binary package. `install' does neither for a
|
||||
# repository package -- it sees the version already recorded and keeps
|
||||
# the old files, so build/packages/All stayed empty and make_repo had
|
||||
# nothing to put on the media (measured 2026-11-23 on the MacBook).
|
||||
for p in $("$TOP/tools/pkglist.sh" built); do
|
||||
phase "package $p"
|
||||
echo "=== chroot: $p"
|
||||
"$TOP/tools/pkgchroot.sh" build "$p" || failed="$failed $p"
|
||||
if "$TOP/tools/pkglist.sh" repo | grep -qx "$p"; then
|
||||
tgt=package
|
||||
else
|
||||
tgt=install
|
||||
fi
|
||||
"$TOP/tools/pkgchroot.sh" build "$tgt" "$p" || failed="$failed $p"
|
||||
done
|
||||
else
|
||||
for p in $("$TOP/tools/pkglist.sh" built); do
|
||||
|
||||
Reference in new issue
Block a user