diff --git a/packages.list b/packages.list index c591c7428d..4d7f78b38d 100644 --- a/packages.list +++ b/packages.list @@ -63,6 +63,14 @@ shells/ksh93 bin # not have (dlopen is in libc): "cannot find -ldl" (build/logs/ # userland-2026-11-14f.log). The NetBSD project's tcl, unpatched. lang/tcl bin +# pkgsrc's own build tools want perl (devel/automake: USE_TOOLS=perl:run, +# devel/gmake: perl:test). NetBSD has no perl in the base system and no +# TOOLS_PLATFORM.perl, so pkgsrc must build lang/perl5 -- and then an +# automake built here cannot be installed: "pkg_add: no pkg found for +# 'perl>=5.0'" (build/logs/release-2026-11-23-mbp1.log:5212). Perl has to be +# in the sysroot before the tools that need it, and on the target: a user +# rebuilding a package with pkgsrc needs it too. +lang/perl5 bin # dtchat (MCDE): libopus carries the calls, libretls (libtls) the IRC adapter's TLS; # configure.ac stops without them, and they must stay in the sysroot: shared # libraries of a program in the set. The NetBSD project's binaries, unpatched. diff --git a/tools/userland.sh b/tools/userland.sh index 7276109b22..3845b2a6a7 100755 --- a/tools/userland.sh +++ b/tools/userland.sh @@ -423,7 +423,20 @@ fetch_binaries() # only the kind "bin": the others are on the media for sysinst, and pkg_add into # the sysroot refused most of them anyway (a library it could not find, a name # that is not the last part of the PKGPATH) -- noise in every run (t0205) - for n in $("$TOP/tools/pkglist.sh" sysroot -n); do + for pp in $("$TOP/tools/pkglist.sh" sysroot); do + # the name of a package is not the last part of its PKGPATH + # (lang/perl5 is perl-5.x, sysutils/py-borgbackup py313-...): + # ask the repository summary the fetch just wrote, and fall back + # to the path when it has no entry + n= + for sum in "$repo/pkg_summary.gz" "$TOP/build/packages/$ARCH/pkg_summary.repo.gz"; do + [ -s "$sum" ] || continue + n=$(zcat "$sum" 2>/dev/null | + awk -v p="$pp" '/^PKGNAME=/{n = substr($0, 9)} + /^PKGPATH=/{ if (substr($0, 9) == p && n != "") { print n; exit } }') + [ -n "$n" ] && break + done + [ -n "$n" ] || n=${pp##*/} if "$TOP/build/pkg/sbin/pkg_info" -K "$db" -e "$n" > /dev/null 2>&1; then continue fi