summaryrefslogtreecommitdiffstats
path: root/urpmi.update
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 02:32:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 02:32:47 +0000
commit62f60a99f83c7b5c820dcb9452d00dfffd381035 (patch)
treedf97879bbd9f330b51a889f66c7f376f3539eedb /urpmi.update
parent458bbe750abd279dc9749b824a986a73f0cffafd (diff)
downloadurpmi-62f60a99f83c7b5c820dcb9452d00dfffd381035.tar
urpmi-62f60a99f83c7b5c820dcb9452d00dfffd381035.tar.gz
urpmi-62f60a99f83c7b5c820dcb9452d00dfffd381035.tar.bz2
urpmi-62f60a99f83c7b5c820dcb9452d00dfffd381035.tar.xz
urpmi-62f60a99f83c7b5c820dcb9452d00dfffd381035.zip
Add options -q and -v (quiet and verbose) to urpmi.update
Diffstat (limited to 'urpmi.update')
-rwxr-xr-xurpmi.update6
1 files changed, 5 insertions, 1 deletions
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"));
}