summaryrefslogtreecommitdiffstats
path: root/urpm/orphans.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-06 11:05:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-06 11:05:37 +0000
commitbd42b1a0ed0c8b607d65c04d70890ad82e0caf55 (patch)
treeeb247549fbcb8485bda6b57435c7a5dfe79bebcd /urpm/orphans.pm
parent1a8adc7f781abdc8d043b88b8ccb59e8f321bb7f (diff)
downloadurpmi-bd42b1a0ed0c8b607d65c04d70890ad82e0caf55.tar
urpmi-bd42b1a0ed0c8b607d65c04d70890ad82e0caf55.tar.gz
urpmi-bd42b1a0ed0c8b607d65c04d70890ad82e0caf55.tar.bz2
urpmi-bd42b1a0ed0c8b607d65c04d70890ad82e0caf55.tar.xz
urpmi-bd42b1a0ed0c8b607d65c04d70890ad82e0caf55.zip
partially revert previous commit
(_selected_unrequested() doesn't need $current_unrequested)
Diffstat (limited to 'urpm/orphans.pm')
-rw-r--r--urpm/orphans.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index db631bc3..2750317c 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -87,14 +87,17 @@ sub _selected_unrequested {
}
#- side-effects: none
sub _renamed_unrequested {
- my ($urpm, $rejected, $current_unrequested) = @_;
+ my ($urpm, $rejected) = @_;
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 = unrequested_list($urpm);
+
my %l;
foreach my $fn (@obsoleted) {
my ($n) = $fn =~ $fullname2name_re;
- $current_unrequested->{$n} or next;
+ $current->{$n} or next;
my ($new_fn) = keys %{$rejected->{$fn}{closure}};
my ($new_n) = $new_fn =~ $fullname2name_re;
@@ -106,12 +109,9 @@ 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}, $current_unrequested),
+ _renamed_unrequested($urpm, $state->{rejected}),
);
}
#- side-effects: <root>/var/lib/rpm/installed-through-deps.list