summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-20 22:38:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-20 22:38:46 +0000
commitbba9772e4d927f8e030f52f8e2fd93495708d9b4 (patch)
treea58be9eeb92a7908cb41eef12f8cc1b9455bb137 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parent8c535558bce9193ff0c6715d567d2fe90d8388d5 (diff)
change verbosity handling: be silent by default, turn on the first level if -v.
Add more levels, specifically, lots of info regarding individual files only visible if -vvvvv. Make -n display the same stuff as normal (need -n -v to display more stuff). Introduce -s, "size-only", turns on -n and does skip any extraction. Sprinkle handlers for SIG_INFO, not really nice yet. Note that -n is non functional for complex updates, because of caching issues I have to fix.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 1b0f04d972a..c9c5e0604a1 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.164 2009/12/17 11:57:02 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.165 2009/12/20 22:38:45 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -409,7 +409,7 @@ sub check_digest
$state->log->fatal("checksum for ", $self->fullname,
" does not match");
}
- if ($state->{very_verbose}) {
+ if ($state->verbose >= 3) {
$state->say("Checksum match for ", $self->fullname);
}
}
@@ -1196,7 +1196,7 @@ sub run
OpenBSD::PackingElement::Lib::ensure_ldconfig($state);
$state->say($self->keyword, " ", $self->{expanded})
- if $state->{beverbose};
+ if $state->verbose >= 2;
$state->log->system(OpenBSD::Paths->sh, '-c', $self->{expanded})
unless $state->{not};
}
@@ -1503,7 +1503,6 @@ sub run
{
my ($self, $state, @args) = @_;
- my $not = $state->{not};
my $pkgname = $state->{pkgname};
my $name = $self->fullname;
@@ -1511,8 +1510,8 @@ sub run
OpenBSD::PackingElement::Lib::ensure_ldconfig($state);
$state->say($self->beautify, " script: $name $pkgname ",
- join(' ', @args)) if $state->{beverbose};
- return if $not;
+ join(' ', @args)) if $state->verbose >= 2;
+ return if $state->{not};
chmod 0755, $name;
return if $state->log->system($name, $pkgname, @args) == 0;
if ($state->{defines}->{scripts}) {