diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-12-29 10:40:17 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-12-29 10:40:17 +0000 |
commit | 31aa6a501eaad442062371a4e37e3ea5a0741090 (patch) | |
tree | b2b6fc7044388461862f523d811483cf14b10838 /usr.sbin/pkg_add/OpenBSD | |
parent | db74a6e433ad22e243c2e2950a7cfd5b1791875a (diff) |
partial backout of 1.166: we still need to compute the pkgname without the
repo for debug packages, but we need the full path for the handle (for now)
fixes regression noticed by bluhm@
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Update.pm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index e4740961098..b46038cc592 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.166 2019/12/08 11:42:32 espie Exp $ +# $OpenBSD: Update.pm,v 1.167 2019/12/29 10:40:16 espie Exp $ # # Copyright (c) 2004-2014 Marc Espie <espie@openbsd.org> # @@ -329,13 +329,16 @@ sub process_hint2 { my ($self, $set, $hint, $state) = @_; my $pkgname = $hint->pkgname; + my $pkg2; if ($pkgname =~ m/[\/\:]/o) { my $repo; - ($repo, $pkgname) = $state->repo->path_parse($pkgname); + ($repo, $pkg2) = $state->repo->path_parse($pkgname); $set->add_repositories($repo); - }; - if (OpenBSD::PackageName::is_stem($pkgname)) { - my $l = $state->updater->stem2location($set, $pkgname, $state, + } else { + $pkg2 = $pkgname; + } + if (OpenBSD::PackageName::is_stem($pkg2)) { + my $l = $state->updater->stem2location($set, $pkg2, $state, $set->{quirks}); if (defined $l) { $self->add_location($set, $hint, $l); @@ -347,8 +350,8 @@ sub process_hint2 if (!defined $cache->{$pkgname}) { $self->add_handle($set, $hint, OpenBSD::Handle->create_new($pkgname)); $cache->{$pkgname} = 1; - $pkgname =~ s/\.tgz$//; - $self->look_for_debug($set, $pkgname, $pkgname, $state); + $pkg2 =~ s/\.tgz$//; + $self->look_for_debug($set, $pkg2, $pkg2, $state); } } OpenBSD::Add::tag_user_packages($set); |