aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-09 15:59:51 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-09 15:59:51 +0000
commit950cdd609322bf0a4d3a7f02f75d86a18e6f13e5 (patch)
tree376c47576d257a4eeecbe7f989b6665bee979226 /Rpmdrake
parentfeaf5f5849c1f6ab9fa4cda1e312d4356d199490 (diff)
downloadrpmdrake-950cdd609322bf0a4d3a7f02f75d86a18e6f13e5.tar
rpmdrake-950cdd609322bf0a4d3a7f02f75d86a18e6f13e5.tar.gz
rpmdrake-950cdd609322bf0a4d3a7f02f75d86a18e6f13e5.tar.bz2
rpmdrake-950cdd609322bf0a4d3a7f02f75d86a18e6f13e5.tar.xz
rpmdrake-950cdd609322bf0a4d3a7f02f75d86a18e6f13e5.zip
(fast_open_urpmi_db) handle -q, --quiet, -v & --verbose options
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/init.pm5
-rw-r--r--Rpmdrake/open_db.pm1
2 files changed, 6 insertions, 0 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm
index 2a87d14b..9d1bfc05 100644
--- a/Rpmdrake/init.pm
+++ b/Rpmdrake/init.pm
@@ -28,6 +28,7 @@ use MDK::Common::Func 'any';
use lib qw(/usr/lib/libDrakX);
use common;
BEGIN { $::no_global_argv_parsing = 1 }
+require urpm::args;
use Exporter;
our @ISA = qw(Exporter);
@@ -111,6 +112,10 @@ foreach (@ARGV) {
exit(0);
} elsif ($val =~ /^(test|expert)$/) {
eval "\$::$1 = 1";
+ } elsif ($val =~ /^(q|quiet)$/) {
+ urpm::args::set_verbose(-1);
+ } elsif ($val =~ /^(v|verbose)$/) {
+ urpm::args::set_verbose(1);
} else {
$rpmdrake_options{$val} = 1;
}
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index e663600b..d33f1b1c 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -69,6 +69,7 @@ sub fast_open_urpmi_db() {
urpm::set_files($urpm, $::rpmdrake_options{'urpmi-root'}[0]) if $::rpmdrake_options{'urpmi-root'}[0];
urpm::args::set_root($urpm, $::rpmdrake_options{'rpm-root'}[0]) if $::rpmdrake_options{'rpm-root'}[0];
urpm::args::set_debug($urpm) if $::rpmdrake_options{'debug'};
+ urpm::args::set_verbosity();
$urpm::args::rpmdrake_options{justdb} = $::rpmdrake_options{justdb};