aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-12 15:00:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-12 15:00:58 +0000
commitfdcc25b760e2367325b957d9faa349fcd0e7a712 (patch)
tree49608daa609beb2329fa60cae02cb8021645f0e3 /URPM
parent8ad950845520ffb10eb8b6e73f42c3b7de528856 (diff)
downloadperl-URPM-fdcc25b760e2367325b957d9faa349fcd0e7a712.tar
perl-URPM-fdcc25b760e2367325b957d9faa349fcd0e7a712.tar.gz
perl-URPM-fdcc25b760e2367325b957d9faa349fcd0e7a712.tar.bz2
perl-URPM-fdcc25b760e2367325b957d9faa349fcd0e7a712.tar.xz
perl-URPM-fdcc25b760e2367325b957d9faa349fcd0e7a712.zip
create _remove_all_rejected_from() out of disable_selected()
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 36930db..70e0c8f 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -499,6 +499,15 @@ sub backtrack_selected_psel_keep {
}
#- side-effects: $state->{rejected}
+sub _remove_all_rejected_from {
+ my ($state, $from_fullname) = @_;
+
+ grep {
+ _remove_rejected_from($state, $_, $from_fullname);
+ } keys %{$state->{rejected}};
+}
+
+#- side-effects: $state->{rejected}
sub _remove_rejected_from {
my ($state, $fullname, $from_fullname) = @_;
@@ -1106,12 +1115,7 @@ sub disable_selected {
#- perform a closure on rejected packages (removed, obsoleted or avoided).
my @rejected_todo = scalar $pkg->fullname;
while (my $fullname = shift @rejected_todo) {
- my @rejecteds = keys %{$state->{rejected}};
- foreach (@rejecteds) {
- if (_remove_rejected_from($state, $_, $fullname)) {
- push @rejected_todo, $_;
- }
- }
+ push @rejected_todo, _remove_all_rejected_from($state, $fullname);
}
#- the package being examined has to be unselected.