summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-28 10:05:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-28 10:05:59 +0000
commit39b3222deb114c1aa0b82e61ee8d09af78a5afd6 (patch)
tree2845357676d2f638976d28e0d3a67b69e32a8e8e /usr.sbin/pkg_add
parent02e0413f405f83d2a5eaa84fde3fef46660044f0 (diff)
still not right, so revert to original algorithm, and compute @todo
in a more expensive way...
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_delete7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index 4617916d0d1..8c53c8613d2 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.127 2009/11/28 10:01:50 espie Exp $
+# $OpenBSD: pkg_delete,v 1.128 2009/11/28 10:05:58 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -122,8 +122,8 @@ sub {
# and finally, handle the removal
do {
$removed = 0;
- DELETE: while (my $pkgname = shift @todo) {
- $state->{todo} = scalar @todo;
+ DELETE: for my $pkgname (@todo) {
+ $state->{todo} = scalar @todo - scalar keys %done;
next if $done{$pkgname};
unless (is_installed($pkgname)) {
$state->say("$pkgname was not installed");
@@ -133,7 +133,6 @@ sub {
}
my $r = OpenBSD::RequiredBy->new($pkgname);
if ($r->list > 0) {
- push(@todo, $pkgname);
if ($defines{baddepend}) {
for my $p ($r->list) {
if ($done{$p}) {