diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-06 11:00:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-06 11:00:09 +0000 |
commit | 1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f (patch) | |
tree | 275c510c2ced96578ff1d573cbdc0dba51271965 /urpm | |
parent | c633bff039a226fbb4053426533c74df56314227 (diff) | |
download | urpmi-1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f.tar urpmi-1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f.tar.gz urpmi-1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f.tar.bz2 urpmi-1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f.tar.xz urpmi-1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f.zip |
- cleanup doc of _renamed_unrequested()
- move things around for next commit
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/orphans.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm index ce050319..db631bc3 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -85,19 +85,16 @@ sub _selected_unrequested { } } keys %$selected; } -#- side-effects: $o_unrequested_list +#- side-effects: none sub _renamed_unrequested { - my ($urpm, $rejected, $o_unrequested_list) = @_; + my ($urpm, $rejected, $current_unrequested) = @_; my @obsoleted = grep { $rejected->{$_}{obsoleted} } keys %$rejected or return; - # we have to read the list to know if the old package was marked "unrequested" - my $current = $o_unrequested_list || unrequested_list($urpm); - my %l; foreach my $fn (@obsoleted) { my ($n) = $fn =~ $fullname2name_re; - $current->{$n} or next; + $current_unrequested->{$n} or next; my ($new_fn) = keys %{$rejected->{$fn}{closure}}; my ($new_n) = $new_fn =~ $fullname2name_re; @@ -109,9 +106,12 @@ sub _renamed_unrequested { } sub _new_unrequested { my ($urpm, $state) = @_; + + my $current_unrequested = unrequested_list($urpm); + ( _selected_unrequested($urpm, $state->{selected}), - _renamed_unrequested($urpm, $state->{rejected}), + _renamed_unrequested($urpm, $state->{rejected}, $current_unrequested), ); } #- side-effects: <root>/var/lib/rpm/installed-through-deps.list |