From 5004679dc4033f9069119f9e1d2cf1fc1a374946 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 3 Aug 2010 14:08:49 +0000 Subject: [PATCH] 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). --- usr.sbin/pkg_add/OpenBSD/Update.pm | 13 +++++++------ 1 file 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 # @@ -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; })); -- 2.20.1