diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2011-11-25 09:26:00 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2011-11-25 09:26:00 +0000 |
commit | 39785fc1144eaeb38c9c3eb8ac604a4bbca7f0b6 (patch) | |
tree | e0bc2f6854fb87b397df5e2bfa4cd444aae4a7fe /usr.sbin | |
parent | c53bfd9518fb7149472a9a10f5a6a49765bec965 (diff) |
fix -a <list> semantics:
instead of first doing, -a, then deleting the list, it's ways more useful
to pick !manual installs in the list and remove them.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgDelete.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm index 10525f2f3b8..5e8f5f63bc0 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgDelete.pm,v 1.24 2011/08/26 08:46:10 espie Exp $ +# $OpenBSD: PkgDelete.pm,v 1.25 2011/11/25 09:25:59 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -379,15 +379,17 @@ sub main { my ($self, $state) = @_; - $self->process_setlist($state); if ($state->{automatic}) { - my $inst = $state->repo->installed; - delete $state->{setlist}; - for my $l (@{$inst->locations_list}) { - $self->add_location($state, $l); + if (@{$state->{setlist}} == 0) { + my $inst = $state->repo->installed; + for my $l (@{$inst->locations_list}) { + $self->add_location($state, $l); + } } $state->{do_automatic} = 1; $self->process_setlist($state); + } else { + $self->process_setlist($state); } } |