aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-26 15:11:40 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-26 15:11:40 +0000
commit6e0d3e00411d0c482814439a0fcd5a9b5089df0a (patch)
tree6111d43d6d1de5b8d1a740f79a19304aa4aa5655
parent7e7a62d588fe132695225a1f65e9104a5c4fb320 (diff)
downloadrpmdrake-6e0d3e00411d0c482814439a0fcd5a9b5089df0a.tar
rpmdrake-6e0d3e00411d0c482814439a0fcd5a9b5089df0a.tar.gz
rpmdrake-6e0d3e00411d0c482814439a0fcd5a9b5089df0a.tar.bz2
rpmdrake-6e0d3e00411d0c482814439a0fcd5a9b5089df0a.tar.xz
rpmdrake-6e0d3e00411d0c482814439a0fcd5a9b5089df0a.zip
(readconf) make --mode option work again
-rw-r--r--Rpmdrake/init.pm1
-rw-r--r--rpmdrake.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm
index 6060ee60..a7c5e059 100644
--- a/Rpmdrake/init.pm
+++ b/Rpmdrake/init.pm
@@ -126,6 +126,7 @@ foreach my $option (qw(media mode parallel rpm-root search)) {
}
our $MODE = ref $rpmdrake_options{mode} ? $rpmdrake_options{mode}[0] : undef;
+our $overriding_config = defined $MODE;
unless ($MODE) {
$MODE = 'install';
$0 =~ m|remove$| and $MODE = 'remove';
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 0870c632..0c8f5835 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -184,7 +184,7 @@ sub readconf() {
}
# special cases:
$::rpmdrake_options{'no-confirmation'} = $no_confirmation->[0] if !defined $::rpmdrake_options{'no-confirmation'};
- $Rpmdrake::init::default_list_mode = $tree_mode->[0] if ref $tree_mode;
+ $Rpmdrake::init::default_list_mode = $tree_mode->[0] if ref $tree_mode && !$Rpmdrake::init::overriding_config;
}
sub writeconf() {