Here is a simple reproducer for the issue
Index: Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/src/regress/usr.sbin/pkg_add/Makefile,v
diff -u -p -r1.90 Makefile
--- Makefile 14 Sep 2025 18:41:11 -0000 1.90
+++ Makefile 23 Jun 2026 14:22:49 -0000
@@ -13,14 +13,14 @@ REGRESS_TARGETS=pkgnames pkgpaths signat
tying-1 tying-2 tag-delete setsprint temp-error1 \
temp-error2 temp-error2-as-root temp-error3 temp-error4 \
cksum-error system-version XXX-warning symlink no-symlink \
- oldlib2 lib-error
+ oldlib2 lib-error gcc15
REGRESS_ROOT_TARGETS = temp-error2-as-root
# lots of tests that really require a vstat overhaul
REGRESS_EXPECTED_FAILURES = collision-check1 collision-check2 \
collision-check5 collision-check6 collision-check7 \
- exotest tying-2
+ exotest tying-2 gcc15
PERLSCRIPT = perl -I ${.CURDIR} ${.CURDIR}
@@ -52,7 +52,7 @@ D$i ?= ${.OBJDIR}/dest$i
DEST$i ?= ${D$i}/usr/local
.endfor
-# current maxes (used): D49, SRC30, plist28, rep7
+# current maxes (used): D49, SRC30, plist28, rep9
pkgnames:
${PERLSCRIPT}/check-name
@@ -338,7 +338,8 @@ rep0/gb-0.tgz rep1/gb-0p0.tgz rep0/gd-0.
rep0/gf-1.tgz rep1/gf-0.tgz \
rep1/missc-0.tgz rep0/q5-0.tgz rep1/q5-1.tgz \
rep0/ma-0.tgz rep1/ma-1.tgz rep0/mc-0.tgz rep1/me-1.tgz \
-rep0/tcl-8.5.7.tgz:
+rep0/tcl-8.5.7.tgz rep8/gcc-libs-15.tgz rep9/gcc-libs-15.tgz \
+rep9/gcc-libs-16.tgz:
@${CREATE_PKG} ${EMPTY} $@
rep0/md-0.tgz:
@@ -783,6 +784,8 @@ rep7/avahi-glib-1.tgz: plist26
rep7/cups-1.tgz:
@${CREATE_PKG} ${WAVE_PLIST} -P't/avahi-libs:avahi-libs-*:avahi-libs-0'
-P't/avahi-glib:avahi-glib-*:avahi-glib-1' -W avahi.0.0 ${EMPTY} $@
+rep8/cfitsio-0.tgz rep9/cfitsio-0.tgz:
+ @${CREATE_PKG} -P't/gcc-libs-15:gcc-libs->=15,<16:gcc-libs-15' ${EMPTY}
$@
rep0/sym-0.tgz: plist19
@mkdir -p ${SRC30}
@@ -837,6 +840,13 @@ lib-error: plist28
@rm -f lib-error.out
@if ${CREATE_PKG} -B src30 -f plist28 bad-package-0 2>lib-error.out;
then exit 1; fi
@diff -u lib-error.out ${.CURDIR}/lib-error.ref
+
+gcc15: rep8/cfitsio-0.tgz rep8/gcc-libs-15.tgz \
+ rep9/cfitsio-0.tgz rep9/gcc-libs-15.tgz rep9/gcc-libs-16.tgz
+ @-rm -rf ${D50}
+ @ROOT=${D50} ${ADD_PKG} rep8/cfitsio-0.tgz
+ @ROOT=${D50} PKG_PATH=${.OBJDIR}/rep9 ${ADD_PKG} -u 2>&1|head -100 |tee
error-loop.out
+ @if [ `wc -l <error-loop.out` -eq 100 ]; then exit 1; fi
clean:
-rm -rf rep* dest* plist* src* signatures.out *.ref *.out