From 8ef41ac935a5a2a35ba65b706beeaa8d27ac61c6 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Tue, 24 Nov 2009 10:22:27 +0000 Subject: better name. Mark "no need to update" as updated, since we know what's going on... --- usr.sbin/pkg_add/OpenBSD/Update.pm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD/Update.pm') diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index 763ff4aa33e..28df9c9d5aa 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.102 2009/11/22 11:26:43 espie Exp $ +# $OpenBSD: Update.pm,v 1.103 2009/11/24 10:22:26 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie # @@ -57,7 +57,7 @@ sub new sub add_handle { my ($self, $set, $old, $n) = @_; - $old->{update} = $n; + $old->{update_found} = $n; $set->add_newer($n); } @@ -143,17 +143,13 @@ sub process_handle return undef; } if (@$l == 1) { - if ($state->{defines}->{pkgpath}) { - $state->say("Directly updating $pkgname -> ", $l->[0]->name); - $self->add_location($set, $h, $l->[0]); - return 1; - } if (defined $found && $found eq $l->[0] && !$plist->uses_old_libs && !$state->{defines}->{installed}) { - my $msg = "No need to update $pkgname"; - $state->progress->message($msg); - $state->say($msg) if $state->{beverbose}; - return 0; + $h->{update_found} = $h; + my $msg = "No need to update $pkgname"; + $state->progress->message($msg); + $state->say($msg) if $state->{beverbose}; + return 0; } } @@ -231,7 +227,7 @@ sub process_set my ($self, $set, $state) = @_; my $problem; for my $h ($set->older, $set->hints) { - next if $h->{update}; + next if $h->{update_found}; if (!defined $h->update($self, $set, $state)) { $problem = 1; } -- cgit v1.2.3