aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/open_db.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake/open_db.pm')
-rw-r--r--Rpmdrake/open_db.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index d33f1b1c..7b6cd896 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -70,6 +70,10 @@ sub fast_open_urpmi_db() {
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];
+ urpm::set_env($urpm, $::env);
+ }
$urpm::args::rpmdrake_options{justdb} = $::rpmdrake_options{justdb};
@@ -99,7 +103,7 @@ sub open_urpmi_db {
my $media = ref $::rpmdrake_options{media} ? join(',', @{$::rpmdrake_options{media}}) : '';
my $searchmedia = $urpmi_options{update} ? undef : join(',', get_inactive_backport_media($urpm));
- $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock});
+ $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}) if !$::env;
my $previous = $::rpmdrake_options{'previous-priority-upgrade'};
urpm::select::set_priority_upgrade_option($urpm, (ref $previous ? join(',', @$previous) : ()));
urpm::media::configure($urpm, media => $media, if_($searchmedia, searchmedia => $searchmedia), %urpmi_options);