diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 20:11:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 20:11:53 +0000 |
commit | 277e941bfef194a7377251697e1e9b09522c2fb0 (patch) | |
tree | 47871fbdd663985420c60d95a3b021ed31348d41 /URPM/Resolve.pm | |
parent | 9655942960b8e06edfa24a56b21e6d77a7d9d611 (diff) | |
download | perl-URPM-277e941bfef194a7377251697e1e9b09522c2fb0.tar perl-URPM-277e941bfef194a7377251697e1e9b09522c2fb0.tar.gz perl-URPM-277e941bfef194a7377251697e1e9b09522c2fb0.tar.bz2 perl-URPM-277e941bfef194a7377251697e1e9b09522c2fb0.tar.xz perl-URPM-277e941bfef194a7377251697e1e9b09522c2fb0.zip |
create _find_packages_obsoleting() out of _handle_diff_provides()
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 0a45cad..0b15eda 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1023,6 +1023,20 @@ sub _no_unsatisfied_requires { @l == 0; } +#- side-effects: none +sub _find_packages_obsoleting { + my ($urpm, $state, $p) = @_; + + grep { + !$_->flag_skip + && $_->is_arch_compat + && !exists $state->{rejected}->{$_->fullname} + && $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release) + && $_->fullname ne $p->fullname + && (!strict_arch($urpm) || strict_arch_check($p, $_)); + } packages_obsoleting($urpm, $p->name); +} + #- side-effects: $properties #- + those of backtrack_selected_psel_keep ($state->{rejected}, $state->{selected}, $state->{whatrequires}, flag_requested, flag_required) #- + those of resolve_rejected_ ($state->{rejected}, $properties) @@ -1044,15 +1058,9 @@ sub _handle_diff_provides { } @packages; if (!@packages) { - @packages = packages_obsoleting($urpm, $p->name); + @packages = _find_packages_obsoleting($urpm, $state, $p); @packages = grep { - !$_->flag_skip - && $_->is_arch_compat - && !exists $state->{rejected}->{$_->fullname} - && $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release) - && $_->fullname ne $p->fullname - && (!strict_arch($urpm) || strict_arch_check($p, $_)) - && _no_unsatisfied_requires($urpm, $db, $state, $_, $n); + _no_unsatisfied_requires($urpm, $db, $state, $_, $n); } @packages; } |