aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--Rpmdrake/open_db.pm6
-rw-r--r--Rpmdrake/pkg.pm5
3 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 84562032..f5391d3d 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
o adapt to urpmi-6.6+ new API (which workaround urpmi API breakage
#43639)
o do not ignore some options
- o handle --debug, -q, --quiet, -v & --verbose options
+ o handle --debug, --env, -q, --quiet, -v & --verbose options
- rpmdrake:
o update GUI package list
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);
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index fb080f63..66705fa5 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -624,8 +624,8 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
return perform_parallel_install($urpm, $group, $w, \$statusbar_msg_id);
}
- my $lock = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock});
- my $rpm_lock = urpm::lock::rpm_db($urpm, 'exclusive');
+ my $lock = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}) if !$::env;
+ my $rpm_lock = urpm::lock::rpm_db($urpm, 'exclusive') if !$::env;
my $state = $priority_state || $probe_only_for_updates ? { } : $urpm->{rpmdrake_state};
my $bar_id = statusbar_msg(N("Checking validity of requested packages..."), 0);
@@ -634,6 +634,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my $requested = { map { $_->id => undef } grep { $_->flag_selected } @{$urpm->{depslist}} };
urpm::select::resolve_dependencies(
$urpm, $state, $requested,
+ rpmdb => $::env && "$::env/rpmdb.cz",
callback_choices => \&Rpmdrake::gui::callback_choices,
);
statusbar_msg_remove($bar_id);