Rationale:
7zip's debug packages would have names that violate the usual package naming
scheme, that the stem ends at the first - followed by a digit.
Simply naming the debug package "debug_7zip" instead of "debug-7zip" removes
the problem without adding over issues.
This is the infrastructure patch to switch to debug_
(There is a corresponding patch to have pkg_add switch to debug_ as well
in the cases it handles debug packages automatically... I surmise it's
easiest to just switch there wholesome)
The infra patch is a bit more tricky, because it handles updates.
- switch the infrastructure name from debug- to debug_
- fix a minor bug in build-debug-info, so that it correctly emits directory
names before files (independent from the rest)
- add conflict information to the new debug_ packages so they can update
debug- packages.
- do similar work in quirks.
(note that these two last points are temporary until everything is switched
over)
Please test and comment.
Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /build/data/openbsd/cvs/ports/infrastructure/mk/bsd.port.mk,v
diff -u -p -r1.1653 bsd.port.mk
--- infrastructure/mk/bsd.port.mk 14 Oct 2026 11:11:29 -0000 1.1653
+++ infrastructure/mk/bsd.port.mk 15 Oct 2026 15:00:02 -0000
@@ -1004,7 +1004,7 @@ PKGFILE = ${_PKG_REPO}${_PKGFILE${SUBPAC
.for _S in ${MULTI_PACKAGES}
_PKGFILE${_S} = ${FULLPKGNAME${_S}}.tgz
-_DBG_PKGFILE${_S} = debug-${_PKGFILE${_S}}
+_DBG_PKGFILE${_S} = debug_${_PKGFILE${_S}}
. if ${PKG_ARCH${_S}} == "*"
_PKG_REPO${_S} = ${_PKG_REPO_NO_ARCH}
. else
Index: infrastructure/bin/build-debug-info
===================================================================
RCS file: /build/data/openbsd/cvs/ports/infrastructure/bin/build-debug-info,v
diff -u -p -r1.50 build-debug-info
--- infrastructure/bin/build-debug-info 2 Jul 2026 15:38:45 -0000 1.50
+++ infrastructure/bin/build-debug-info 15 Oct 2026 22:52:35 -0000
@@ -140,11 +140,11 @@ sub write_debug_info($self, $base, $fh,
sub write_debug_entry($self, $fh, $dir, $dbg, $o)
{
- print $fh $dbg, "\n";
if (!exists $o->{dirstash}{$dir}) {
print $fh $dir, "\n";
$o->{dirstash}{$dir} = 1;
}
+ print $fh $dbg, "\n";
$o->{ostash}{$dbg} = 1;
delete $o->{empty};
}
@@ -269,7 +269,11 @@ for my $l (@{$self->{lists}}) {
$name = $state->{pkgdir}."/".(basename $name);
my $fh = $state->openfile($name);
$self->{first_cwd} = 1;
- $l->olist->write_debug_info($base, $fh, $self);
+
+ my $p = $l->olist;
+ say $fh "\@conflict ", "debug-",
+ OpenBSD::PackageName::splitstem($p->pkgname), "-*";
+ $p->write_debug_info($base, $fh, $self);
close($fh) or $state->fatal("Can't write plist: #1", $!);
$self->warn_if_empty($state, $l);
}
Index: devel/quirks/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/devel/quirks/Makefile,v
diff -u -p -r1.1826 Makefile
--- devel/quirks/Makefile 15 Oct 2026 11:21:41 -0000 1.1826
+++ devel/quirks/Makefile 15 Oct 2026 22:55:15 -0000
@@ -3,7 +3,7 @@ CATEGORIES = devel databases
DISTFILES =
# API.rev
-PKGNAME = quirks-7.233
+PKGNAME = quirks-7.234
PKG_ARCH = *
MAINTAINER = Marc Espie <[email protected]>
Index: devel/quirks/files/Quirks.pm
===================================================================
RCS file: /build/data/openbsd/cvs/ports/devel/quirks/files/Quirks.pm,v
diff -u -p -r1.1840 Quirks.pm
--- devel/quirks/files/Quirks.pm 15 Oct 2026 11:21:41 -0000 1.1840
+++ devel/quirks/files/Quirks.pm 15 Oct 2026 22:55:05 -0000
@@ -802,6 +802,12 @@ sub may_add_stems
{
my ($self, $object, $stem, $state) = @_;
+ # transparently update old debug names into new
+ my $dbg = $stem;
+ if ($dbg =~ s/^debug-/debug_/) {
+ $object->add_stem($dbg);
+ }
+
my $extra = $stem_extensions->{$stem};
if (defined $extra) {
if (ref $extra) {