makronix-set.sh: the seeds are the packages 'set' and 'bin'; what else is registered in the sysroot is removed with pkg_delete (x11-links and osabi stay); the list of 2026-11-15
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1a7c0c3ff
commit
909271b3d7
2 files changed
+26554
-26538
No files matched your search
+26527
-26526
File diff suppressed because it is too large.
Load diff
+27
-12
@@ -119,18 +119,16 @@ for pp in $("${TOP}/tools/pkglist.sh" set); do
|
||||
printf '%s\n' "${full}" >> "${tmp}/seed"
|
||||
done
|
||||
|
||||
# The set is what is installed in the sysroot, not only what the packages named
|
||||
# "set" need: the NetBSD project's binaries (vim, git, ksh93, sysupgrade ...) are
|
||||
# installed there by tools/userland.sh and belong to it -- "the makronix set is
|
||||
# read back from what is installed" (userland.sh, fetch_binaries). With the
|
||||
# closure of the three built packages alone, 56647 files of /usr/pkg were in
|
||||
# the sysroot and in no list, and checkflist stopped the release
|
||||
# (build/logs/release-2026-11-14d.log:79423). The packages above must be
|
||||
# registered, as before; the closure then walks from every installed package.
|
||||
for d in "${DB}"/*/; do
|
||||
[ -f "${d}+CONTENTS" ] || continue
|
||||
q=${d%/}; q=${q##*/}
|
||||
printf '%s\n' "$q" >> "${tmp}/seed"
|
||||
# The seeds are the packages named "set" and the NetBSD binaries of kind "bin"
|
||||
# (packages.list; vim, git-base, sysupgrade -- the base set's own -- and flex,
|
||||
# ksh93, tcl, which packages built here need): tools/userland.sh puts exactly
|
||||
# those into the sysroot (t0205). The closure below adds what they need to run.
|
||||
for pp in $("${TOP}/tools/pkglist.sh" sysroot); do
|
||||
n=${pp##*/}
|
||||
full=$("${PKG_INFO}" -K "${DB}" -E "$n" 2>/dev/null | head -1 || true)
|
||||
[ -n "${full}" ] || full=$(awk -v p="$pp" '$2 == p { print $1; exit }' "${tmp}/pnp")
|
||||
[ -n "${full}" ] || { echo "makronix-set: binary package '${pp}' is not registered in ${DB}" >&2; exit 1; }
|
||||
printf '%s\n' "${full}" >> "${tmp}/seed"
|
||||
done
|
||||
LC_ALL=C sort -u "${tmp}/seed" > "${tmp}/seed.u" && mv "${tmp}/seed.u" "${tmp}/seed"
|
||||
|
||||
@@ -156,6 +154,23 @@ while [ -s "${tmp}/queue" ]; do
|
||||
done
|
||||
done
|
||||
|
||||
# What is registered in the sysroot but not in the closure is not part of the set,
|
||||
# and its files would be "extra files in DESTDIR" for checkflist: a package that
|
||||
# an earlier run installed (cups, cups-filters ... when userland.sh still put
|
||||
# every "fetch" package there, t0205) is removed with pkg_delete.
|
||||
for d in "${DB}"/*/; do
|
||||
[ -f "${d}+CONTENTS" ] || continue
|
||||
q=${d%/}; q=${q##*/}
|
||||
grep -qx "$q" "${tmp}/pkgs" 2>/dev/null && continue
|
||||
# the build's own: the shadow tree of the native X that every package of the
|
||||
# cross build is configured against (x11-links, its files are kept out of the
|
||||
# set above), and pkgsrc's ABI marker
|
||||
case "$q" in x11-links-*|osabi-*) continue ;; esac
|
||||
echo "makronix-set: $q is not in the set, removed from the sysroot" >&2
|
||||
"${TOP}/build/pkg/sbin/pkg_delete" -f -P "${DESTDIR}" -K /usr/pkg/pkgdb "$q" > "${TOP}/build/logs/pkg-delete-$q.log" 2>&1 ||
|
||||
{ echo "makronix-set: could not remove $q (build/logs/pkg-delete-$q.log)" >&2; exit 1; }
|
||||
done
|
||||
|
||||
mkdir -p "${LISTDIR}"
|
||||
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user