From 31aa6a501eaad442062371a4e37e3ea5a0741090 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 29 Dec 2019 10:40:17 +0000 Subject: 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@ --- usr.sbin/pkg_add/OpenBSD/Update.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD') 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 # @@ -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); -- cgit v1.2.3