summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2022-11-04 13:22:16 +0000
committerMarc Espie <espie@cvs.openbsd.org>2022-11-04 13:22:16 +0000
commit73d53827cf25f86628e48155689805b594c254c7 (patch)
treeda9f393c801f5ed5161893620545ab03b8ae3bb2
parent73da233543e46e928c4527ca83d5dda4fda96113 (diff)
allow "=" to be "hey only the default value" for pkgspec in dependencies
to be used later once it's in snaps.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 39cad4e0792..864fb13141e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.283 2022/06/28 08:15:43 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.284 2022/11/04 13:22:15 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -1079,7 +1079,13 @@ OpenBSD::Auto::cache(spec,
require OpenBSD::Search;
my $self = shift;
- return OpenBSD::Search::PkgSpec->new($self->{pattern})
+ my $src;
+ if ($self->{pattern} eq '=') {
+ $src = $self->{def};
+ } else {
+ $src = $self->{pattern};
+ }
+ return OpenBSD::Search::PkgSpec->new($src)
->add_pkgpath_hint($self->{pkgpath});
});