summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-07-26 23:28:07 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-07-26 23:28:07 +0000
commit18ddcc873d7b9e9274372883a3f2f71c02fb5ee2 (patch)
tree6a7c48a22e1325f437c4a3e3c0256c05952643d4 /usr.sbin/pkg_add
parent5e2aaed9a053ab4a5cb180339e3a692657f39edd (diff)
better progress_message
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm11
1 files changed, 6 insertions, 5 deletions
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 <espie@openbsd.org>
#
@@ -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;