aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-20 14:30:34 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-20 14:30:34 +0000
commitb20a316383df86c6ac8dc7ad8e575c6785cc9db5 (patch)
treea6766532bc0f16dd1bb0e2e02f7fd1c6e5105d2c
parent7ba250994c436be3a2b618933b9b1a3f9874dce4 (diff)
downloadrpmdrake-b20a316383df86c6ac8dc7ad8e575c6785cc9db5.tar
rpmdrake-b20a316383df86c6ac8dc7ad8e575c6785cc9db5.tar.gz
rpmdrake-b20a316383df86c6ac8dc7ad8e575c6785cc9db5.tar.bz2
rpmdrake-b20a316383df86c6ac8dc7ad8e575c6785cc9db5.tar.xz
rpmdrake-b20a316383df86c6ac8dc7ad8e575c6785cc9db5.zip
(fast_open_urpmi_db) load global options after mananing --urpmi-root,
thus fixing loading options from chrooted config file
-rw-r--r--NEWS2
-rw-r--r--Rpmdrake/open_db.pm4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index f05b3977..8ad691b1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix loading options from chrooted config file
+
Version 5.2 - 16 October 2008, Thierry Vignaud
- better looking messages when downloading files
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index d3cf568d..449ce97b 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -68,14 +68,14 @@ sub open_rpm_db {
# do not pay the urpm::media::configure() heavy cost:
sub fast_open_urpmi_db() {
my $urpm = urpm->new;
+ 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->get_global_options;
my $error_happened;
$urpm->{options}{wait_lock} = $::rpmdrake_options{'wait-lock'};
$urpm->{options}{'verify-rpm'} = !$::rpmdrake_options{'no-verify-rpm'} if defined $::rpmdrake_options{'no-verify-rpm'};
$urpm->{options}{auto} = $::rpmdrake_options{auto} if defined $::rpmdrake_options{auto};
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();
if ($::rpmdrake_options{env} && $::rpmdrake_options{env}[0]) {
$::env = $::rpmdrake_options{env}[0];