diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-10-11 12:31:03 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-10-11 12:31:03 +0000 |
commit | e01ed23847fd75c91b2ff5f1f857439fdc66315d (patch) | |
tree | de90f2ec9204ec4ccabc60f5ed3697797088f131 | |
parent | 1422b04ec570858ccffcc8e262aec8d24dd9e253 (diff) |
$state->{beverbose} = $state->{verbose} || $state->{not}
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index f871b91a5f5..575f9b92048 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.50 2004/10/11 11:48:18 espie Exp $ +# $OpenBSD: pkg_delete,v 1.51 2004/10/11 12:31:02 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -135,7 +135,7 @@ sub delete my $name = $self->{name}; - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "rmuser: $name\n"; } @@ -159,7 +159,7 @@ sub delete my $name = $self->{name}; - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "rmgroup: $name\n"; } @@ -183,7 +183,7 @@ sub delete my $name = $self->fullname(); - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "dirrm: $name\n"; } @@ -213,7 +213,7 @@ sub delete my ($self, $state) = @_; my $cmd = $self->{expanded}; main::ensure_ldconfig($state->{verbose}) unless $state->{not}; - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "unexec: $cmd\n"; } return if $state->{not}; @@ -228,7 +228,7 @@ sub delete my $name = $self->fullname(); my $realname = $state->{destdir}.$name; if (-l $realname) { - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "deleting symlink: $realname\n"; } } else { @@ -253,7 +253,7 @@ sub delete return; } } - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "deleting: $realname\n"; } } @@ -372,7 +372,7 @@ sub delete return unless $state->{extra}; my $name = $self->fullname(); my $realname = $state->{destdir}.$name; - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "deleting extra file: $realname\n"; } return if $state->{not}; @@ -428,7 +428,7 @@ sub delete my $cmd = $self->{expanded}; main::ensure_ldconfig($state->{verbose}) unless $state->{not}; - if ($state->{verbose} or $state->{not}) { + if ($state->{beverbose}) { print "unexec: $cmd\n"; } return if $state->{not}; @@ -628,6 +628,7 @@ my $state = {}; $state->{not} = $opt_n; $state->{quick} = $opt_q; $state->{verbose} = $opt_v; +$state->{beverbose} = $opt_n || $opt_v; $state->{extra} = $opt_c; $ENV{'PKG_DELETE_EXTRA'} = $state->{extra} ? "Yes" : "No"; |