summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2010-08-03 14:08:49 +0000
committerespie <espie@openbsd.org>2010-08-03 14:08:49 +0000
commit5004679dc4033f9069119f9e1d2cf1fc1a374946 (patch)
tree2ed4baf34aa9f398e70b2e5a5beaf83ffc59179e
parentuse proper log idiom (blanket okay from theo for pkg_add careful changes for (diff)
downloadwireguard-openbsd-5004679dc4033f9069119f9e1d2cf1fc1a374946.tar.xz
wireguard-openbsd-5004679dc4033f9069119f9e1d2cf1fc1a374946.zip
bug-fix: during updates, only set oldfound after we found a matching pkgpath.
that way, we detect pkgpath problems as "can't update" instead of silently ignoring them (gconf2 issue).
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index 1d7dbdaae3b..956757765c7 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.144 2010/07/31 11:17:22 espie Exp $
+# $OpenBSD: Update.pm,v 1.145 2010/08/03 14:08:49 espie Exp $
#
# Copyright (c) 2004-2010 Marc Espie <espie@openbsd.org>
#
@@ -162,8 +162,13 @@ sub process_handle
next;
}
}
+ if (!$plist->match_pkgpath($p2)) {
+ $loc->forget;
+ next
+ }
if ($p2->has('explicit-update') && $state->{allupdates}) {
$oldfound = 1;
+ $loc->forget;
next;
}
my $r = $plist->signature->compare($p2->signature);
@@ -172,11 +177,7 @@ sub process_handle
$loc->forget;
next;
}
- if ($plist->match_pkgpath($p2)) {
- push(@l2, $loc);
- next
- }
- $loc->forget;
+ push(@l2, $loc);
}
return \@l2;
}));