summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-28 09:36:33 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-28 09:36:33 +0000
commita788d89140485c7e50485df6b911884a581de063 (patch)
tree0b66efe881f623421686417717565c4242015035 /usr.sbin/pkg_add
parentbbc9e2c197b1fffffb9822b46358954e9d1ee1b6 (diff)
add (n to go) to pkg_delete as well.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm4
-rw-r--r--usr.sbin/pkg_add/pkg_delete5
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index ef3d4c8294e..331b970c32e 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.88 2009/11/16 14:42:18 espie Exp $
+# $OpenBSD: Delete.pm,v 1.89 2009/11/28 09:36:32 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -115,7 +115,7 @@ sub delete_package
$state->vstat->synchronize;
delete_plist($plist, $state);
- $state->progress->next;
+ $state->progress->next($state->{todo});
}
sub unregister_dependencies
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 703b36afd91..cd400ea8874 100644
--- a/usr.sbin/pkg_add/pkg_delete
+++ b/usr.sbin/pkg_add/pkg_delete
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_delete,v 1.125 2009/11/17 10:17:21 espie Exp $
+# $OpenBSD: pkg_delete,v 1.126 2009/11/28 09:36:32 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -122,7 +122,8 @@ sub {
# and finally, handle the removal
do {
$removed = 0;
- DELETE: for my $pkgname (@todo) {
+ DELETE: while (my $pkgname = pop @todo) {
+ $state->{todo} = scalar @todo;
next if $done{$pkgname};
unless (is_installed($pkgname)) {
$state->say("$pkgname was not installed");