summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2018-12-12 14:11:04 +0000
committerMarc Espie <espie@cvs.openbsd.org>2018-12-12 14:11:04 +0000
commit054ba4f650500a0f515bc85d725768ec24ed9e7c (patch)
tree35771387f03c147425c93afa7813e9b2035d448f
parent96fb5329d8ece599579dc9d65b87c2006f10f4de (diff)
moving handles to kept means they're not affected by complete_set, which
means that they won't get their dependency information. But if they're in kept, they're actually installed so make sure they have a location. This will let pkg_add always follow dependencies for all sets even if there's nothing to directly install
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index 68b125f344d..2dd5faa7c4d 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.81 2018/07/18 13:06:23 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.82 2018/12/12 14:11:03 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -280,6 +280,10 @@ sub move_kept
delete $self->{older}{$h->pkgname};
delete $self->{newer}{$h->pkgname};
$self->{kept}{$h->pkgname} = $h;
+ if (!defined $h->{location}) {
+ $h->{location} =
+ $self->{repo}->installed->find($h->pkgname);
+ }
$h->complete_dependency_info;
$h->{update_found} = $h;
}