aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-27 15:04:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-27 15:04:28 +0000
commit54aecb86a7407d5245cc0f7db944feaaabfb3b9f (patch)
tree9d44e3070eb802d3b50a06ed352a6da537a68e71 /URPM
parentea3613ef6418131778303187711a960adb9e923a (diff)
downloadperl-URPM-54aecb86a7407d5245cc0f7db944feaaabfb3b9f.tar
perl-URPM-54aecb86a7407d5245cc0f7db944feaaabfb3b9f.tar.gz
perl-URPM-54aecb86a7407d5245cc0f7db944feaaabfb3b9f.tar.bz2
perl-URPM-54aecb86a7407d5245cc0f7db944feaaabfb3b9f.tar.xz
perl-URPM-54aecb86a7407d5245cc0f7db944feaaabfb3b9f.zip
simplify
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index c3ca974..04f9570 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1011,14 +1011,15 @@ sub _handle_diff_provides {
#- there is no need to avoid promoting epoch as the package examined is not
#- already installed.
my @packages = find_candidate_packages_($urpm, $p->name, $state->{rejected});
- my $best = join '|', map { $_->id }
+ @packages =
grep { ($_->name eq $p->name ||
$_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release))
&& $_->fullname ne $p->fullname &&
unsatisfied_requires($urpm, $db, $state, $_, name => $n) == 0 }
@packages;
- if (length $best) {
+ if (@packages) {
+ my $best = join('|', map { $_->id } @packages);
$urpm->{debug_URPM}("promoting " . $urpm->{depslist}[$best]->fullname . " because of conflict above") if $urpm->{debug_URPM};
push @$properties, { required => $best, promote => $n, psel => $pkg };
} else {