summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-07-06 12:12:38 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-07-06 12:12:38 +0000
commit1f783a856e72156e8289a93d6d3cd185c0b7d0c1 (patch)
tree06277f2f27b37c86d2ac2b10fd9852b33b56210c /usr.sbin
parentad2bcb09fdc0cd23e4da431ec82b0c3fe9b117d0 (diff)
fuss over wantntogo, especially when it's false (make sure we still get :ok
at end of lines instead of '' replacing 30/50)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm6
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm6
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index 56a192c733d..9a4b8f224a3 100644
--- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: AddDelete.pm,v 1.34 2010/07/04 18:21:03 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.35 2010/07/06 12:12:37 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -178,7 +178,9 @@ sub ntogo
{
my ($self, $offset) = @_;
- return $self->{wantntogo} ? $self->progress->ntogo($self, $offset) : "";
+ return $self->{wantntogo} ?
+ $self->progress->ntogo($self, $offset) :
+ $self->f("ok");
}
sub ntogo_string
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index 3c011489829..ba152d31cce 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.141 2010/06/30 10:51:04 espie Exp $
+# $OpenBSD: Update.pm,v 1.142 2010/07/06 12:12:37 espie Exp $
#
# Copyright (c) 2004-2010 Marc Espie <espie@openbsd.org>
#
@@ -71,7 +71,9 @@ sub add_location
sub progress_message
{
my ($self, $state, $msg) = @_;
- $msg .= " (".$state->ntogo.")";
+ if ($state->{wantntogo}) {
+ $msg .= " (".$state->ntogo.")";
+ }
$state->progress->message($msg);
$state->say($msg) if $state->verbose >= 2;
}