diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-06 19:44:03 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-06 19:44:03 +0000 |
commit | 4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9 (patch) | |
tree | 88a077a1f6ef4fc55d38e3948d53002ce7efd9a9 /urpm | |
parent | 7071e2acea4052ae587f8eba015900d290c946bd (diff) | |
download | urpmi-4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9.tar urpmi-4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9.tar.gz urpmi-4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9.tar.bz2 urpmi-4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9.tar.xz urpmi-4004d5998d1c6dc034ffddfbc5aa4637d1f9cac9.zip |
(_all_unrequested_orphans) fix reading unrequested packages list
(/var/lib/rpm/installed-through-deps.list) when chrooted
(was trying to read out of chroot one when computing orphans)
(compute_future_unrequested_orphans,get_orphans) adapt to new calling
convention
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/orphans.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm index 2682f1aa..7aa6e790 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -355,15 +355,14 @@ sub _get_orphan_kernels() { #- #- side-effects: none sub _all_unrequested_orphans { - my ($req, $unreq) = @_; + my ($urpm, $req, $unreq) = @_; my (%l, %provides); foreach my $pkg (@$unreq) { $l{$pkg->name} = $pkg; push @{$provides{$_}}, $pkg foreach $pkg->provides_nosense; } - # (tv) FIXME: this won't work when chrooted: - my $unreq_list = unrequested_list(); + my $unreq_list = unrequested_list($urpm); my $current_kernel = _get_current_kernel_package(); @@ -413,7 +412,7 @@ sub compute_future_unrequested_orphans { my ($unreq, $req) = partition { $unrequested->{$_->name} } @pkgs; - $state->{orphans_to_remove} = _all_unrequested_orphans($req, $unreq); + $state->{orphans_to_remove} = _all_unrequested_orphans($urpm, $req, $unreq); # nb: $state->{orphans_to_remove} is used when computing ->selected_size } @@ -429,7 +428,7 @@ sub get_orphans { $urpm->{log}("computing unrequested orphans"); my ($req, $unreq) = _installed_req_and_unreq($urpm); - _all_unrequested_orphans($req, $unreq); + _all_unrequested_orphans($urpm, $req, $unreq); } sub _get_now_orphans_raw_msg { |