On Fri, Oct 16, 2026 at 07:57:44AM +0100, Stuart Henderson wrote:
> > >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.
> >
> > While we're at it, shouldn't we try to find a prefix that has little to no
> > chance to clash? I fear that debug_ might be too generic?
> > Maybe that's just me :-)
>
> Another issue with the current naming is that it's very susceptible
> to 'shearing' during a mirror sync.
>
> Could this be done as a suffix rather than a prefix or is that just
> going to be too messy? ("debug" is definitely too generic in this
> position, but e.g. "squid-7.7p0v0-krb5-dbg").
How about this ?
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 16 Oct 2026 09:08:08 -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: 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 16 Oct 2026 09:07:26 -0000
@@ -989,7 +989,7 @@ PKGFILES += ${PKGFILE${_s}}
PKGPATHS += ${FULLPKGPATH${_s}}
. if ${DEBUG_PACKAGES:M${_s}}
PKGFILES += ${_PKG_REPO}${_DBG_PKGFILE${_s}}
-PKGNAMES += debug-${FULLPKGNAME${_s}}
+PKGNAMES += ${FULLPKGNAME${_s}:C/(-[0-9])/-debug\1/}
#PKGPATHS += debug/${FULLPKGPATH${_s}} # XXX sqlports doesn't like it
. endif
.endfor
@@ -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} = ${_PKGFILE${_S}:C/(-[0-9])/-debug\1/}
. if ${PKG_ARCH${_S}} == "*"
_PKG_REPO${_S} = ${_PKG_REPO_NO_ARCH}
. else
Index: devel/quirks/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/devel/quirks/Makefile,v
diff -u -p -r1.1829 Makefile
--- devel/quirks/Makefile 16 Oct 2026 06:30:35 -0000 1.1829
+++ devel/quirks/Makefile 16 Oct 2026 09:10:40 -0000
@@ -3,7 +3,7 @@ CATEGORIES = devel databases
DISTFILES =
# API.rev
-PKGNAME = quirks-7.236
+PKGNAME = quirks-7.237
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.1843 Quirks.pm
--- devel/quirks/files/Quirks.pm 16 Oct 2026 06:30:35 -0000 1.1843
+++ devel/quirks/files/Quirks.pm 16 Oct 2026 09:10:23 -0000
@@ -808,6 +808,12 @@ sub may_add_stems
{
my ($self, $object, $stem, $state) = @_;
+ # transparently update old debug names into new
+ my $dbg = $stem;
+ if ($dbg =~ s/^debug-(.*)/$1-debug/) {
+ $object->add_stem($dbg);
+ }
+
my $extra = $stem_extensions->{$stem};
if (defined $extra) {
if (ref $extra) {