diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 5 |
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}) { |