summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/AddDelete.pm13
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm13
2 files changed, 19 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm
index b27ffb8f521..573c0569f5a 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.6 2009/12/14 09:35:56 espie Exp $
+# $OpenBSD: AddDelete.pm,v 1.7 2009/12/17 11:11:51 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -222,11 +222,7 @@ sub ntogo
{
my $self = shift;
- if (defined $self->{todo} && $self->{todo} > 0) {
- return " ($self->{todo} to go)";
- } else {
- return "";
- }
+ return $self->progress->ntogo($self->{todo});
}
sub vstat
@@ -368,6 +364,11 @@ sub print
print @_;
}
+sub ntogo
+{
+ return "";
+}
+
sub errprint
{
shift;
diff --git a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
index c20670e7b46..be7f8d7cc65 100644
--- a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ProgressMeter.pm,v 1.24 2009/12/14 09:35:56 espie Exp $
+# $OpenBSD: ProgressMeter.pm,v 1.25 2009/12/17 11:11:51 espie Exp $
#
# Copyright (c) 2004-2007 Marc Espie <espie@openbsd.org>
#
@@ -159,4 +159,15 @@ sub next
print "$header: ok$todo\n";
}
+sub ntogo
+{
+ my ($self, $todo) = @_;
+
+ if (defined $todo && $todo > 0) {
+ return " ($todo to go)";
+ } else {
+ return "";
+ }
+}
+
1;