summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-28 10:01:51 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-28 10:01:51 +0000
commit02e0413f405f83d2a5eaa84fde3fef46660044f0 (patch)
tree5e4a9a4a7da2c8f9c6b02c6ea083d080faf91814 /usr.sbin
parentc62b71d3dc2f045434a469d369eff09645474d7c (diff)
oops, if I want to modify @todo, I should do it right.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/pkg_delete5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index cd400ea8874..4617916d0d1 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.126 2009/11/28 09:36:32 espie Exp $
+# $OpenBSD: pkg_delete,v 1.127 2009/11/28 10:01:50 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -122,7 +122,7 @@ sub {
# and finally, handle the removal
do {
$removed = 0;
- DELETE: while (my $pkgname = pop @todo) {
+ DELETE: while (my $pkgname = shift @todo) {
$state->{todo} = scalar @todo;
next if $done{$pkgname};
unless (is_installed($pkgname)) {
@@ -133,6 +133,7 @@ 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}) {