diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 20:05:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 20:05:31 +0000 |
commit | 9655942960b8e06edfa24a56b21e6d77a7d9d611 (patch) | |
tree | 98657fa475b593fbb2122a565b761b782ee4adbb | |
parent | 5f3d411cb9af407f2b63539e44abaf02f649433c (diff) | |
download | perl-URPM-9655942960b8e06edfa24a56b21e6d77a7d9d611.tar perl-URPM-9655942960b8e06edfa24a56b21e6d77a7d9d611.tar.gz perl-URPM-9655942960b8e06edfa24a56b21e6d77a7d9d611.tar.bz2 perl-URPM-9655942960b8e06edfa24a56b21e6d77a7d9d611.tar.xz perl-URPM-9655942960b8e06edfa24a56b21e6d77a7d9d611.zip |
cleanup (and prepare next commit)
-rw-r--r-- | URPM/Resolve.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index a6ef9d0..0a45cad 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -55,6 +55,9 @@ sub find_candidate_packages_ { } @packages; } + +#- deprecated +#- #- side-effects: none sub find_candidate_packages { my ($urpm, $id_prop, $o_rejected) = @_; @@ -1097,13 +1100,12 @@ sub _handle_conflict { #- whether a newer version will be ok, else ask to remove the old. my $need_deps = $p->name . " > " . ($p->epoch ? $p->epoch . ":" : "") . $p->version . "-" . $p->release; - my $packages = find_candidate_packages($urpm, $need_deps, $state->{rejected}); - my $best = join('|', map { $_->id } - grep { ! $_->provides_overlap($property) } - @{$packages->{$p->name}}); + my @packages = grep { $_->name eq $p->name } find_candidate_packages_($urpm, $need_deps, $state->{rejected}); + @packages = grep { ! $_->provides_overlap($property) } @packages; - if (length $best) { - $urpm->{debug_URPM}("promoting " . $urpm->{depslist}[$best]->fullname . " because of conflict above") if $urpm->{debug_URPM}; + if (@packages) { + my $best = join('|', map { $_->id } @packages); + $urpm->{debug_URPM}("promoting " . join('|', map { scalar $_->fullname } @packages) . " because of conflict above") if $urpm->{debug_URPM}; unshift @$properties, { required => $best, promote_conflicts => $reason }; } else { if ($keep) { |