From: espie Date: Mon, 26 Jul 2010 23:28:06 +0000 (+0000) Subject: better progress_message X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4b4be44c14157c1cecb0cda8471a1ea064fae8ae;p=openbsd better progress_message --- diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index ba152d31cce..9b193a47bfb 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.142 2010/07/06 12:12:37 espie Exp $ +# $OpenBSD: Update.pm,v 1.143 2010/07/26 23:28:06 espie Exp $ # # Copyright (c) 2004-2010 Marc Espie # @@ -70,7 +70,8 @@ sub add_location sub progress_message { - my ($self, $state, $msg) = @_; + my ($self, $state, @r) = @_; + my $msg = $state->f(@r); if ($state->{wantntogo}) { $msg .= " (".$state->ntogo.")"; } @@ -187,8 +188,8 @@ sub process_handle $h->{update_found} = $h; $set->move_kept($h); - $self->progress_message($state, - "No need to update $pkgname"); + $self->progress_message($state, + "No need to update #1", $pkgname); return 0; } @@ -232,7 +233,7 @@ sub process_hint my $k = OpenBSD::Search::FilterLocation->keep_most_recent; # first try to find us exactly - $state->progress->message("Looking for $hint_name"); + $self->progress_message($state, "Looking for #1", $hint_name); $l = $set->match_locations(OpenBSD::Search::Exact->new($hint_name), $k); if (@$l == 0) { my $t = $hint_name;