diff options
-rw-r--r-- | urpm/args.pm | 2 | ||||
-rwxr-xr-x | urpmi.update | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index 48ce9b38..4c2f62bc 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -244,6 +244,8 @@ my %options_spec = ( 'limit-rate=s' => \$options{limit_rate}, 'no-md5sum' => \$options{nomd5sum}, 'noa|d' => \my $dummy, # default, keeped for compatibility + 'q|quiet' => sub { --$options{verbose} }, + 'v|verbose' => sub { ++$options{verbose} }, '<>' => sub { push @::toupdates, $_[0] }, }, diff --git a/urpmi.update b/urpmi.update index 4dd07bfc..d018c694 100755 --- a/urpmi.update +++ b/urpmi.update @@ -41,6 +41,8 @@ where <name> is a medium name to update. ") . N(" -a - select all non-removable media. ") . N(" -c - clean headers cache directory. ") . N(" -f - force generation of hdlist files. +") . N(" -q - quiet mode. +") . N(" -v - verbose mode. "); exit 0; } @@ -50,10 +52,12 @@ sub main { my $urpm = new urpm; $options{force} = 0; - $options{noclean} = 1; + $options{noclean} = $options{verbose} = 1; urpm::args::parse_cmdline(urpm => $urpm); + $options{verbose} > 0 or $urpm->{log} = sub {}; + if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to update media")); } |