summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/args.pm2
-rw-r--r--urpm/orphans.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 35a3068c..e5db95a3 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -417,7 +417,7 @@ foreach my $k ('allow-medium-change', 'auto', 'auto-select', 'clean', 'force', '
}
$options_spec{gurpmi2} = $options_spec{gurpmi};
-foreach my $k ("test!", "force", "root=s", "use-distrib=s",
+foreach my $k ("test!", "force", "root=s", "use-distrib=s", 'env=s',
'repackage', 'noscripts', 'auto', 'auto-orphans', 'justdb',
"parallel=s")
{
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index 53abb41c..ceb9a3e0 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -25,7 +25,7 @@ sub installed_packages_packed {
#- side-effects: none
sub unrequested_list__file {
my ($urpm) = @_;
- "$urpm->{root}/var/lib/rpm/installed-through-deps.list";
+ ($urpm->{env_dir} || "$urpm->{root}/var/lib/rpm") . '/installed-through-deps.list';
}
#- side-effects: none
sub unrequested_list {
@@ -65,7 +65,7 @@ sub _installed_req_and_unreq_and_update_unrequested_list {
# update the list (to filter dups and now-removed-pkgs)
output_safe(unrequested_list__file($urpm),
join('', sort map { $_->name . "\n" } @$unreq),
- ".old");
+ ".old") if !$urpm->{env_dir};
($req, $unreq, $unrequested);
}