diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 08:34:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 08:34:33 +0000 |
commit | 34d2d19b79c2ed4b7ff25798645c8112c0a50140 (patch) | |
tree | e05f0d13a0b46fc9e876c059040303b3d7591315 /URPM/Resolve.pm | |
parent | 395ea135f66993a63f065dbf19702c94820e06ca (diff) | |
download | perl-URPM-34d2d19b79c2ed4b7ff25798645c8112c0a50140.tar perl-URPM-34d2d19b79c2ed4b7ff25798645c8112c0a50140.tar.gz perl-URPM-34d2d19b79c2ed4b7ff25798645c8112c0a50140.tar.bz2 perl-URPM-34d2d19b79c2ed4b7ff25798645c8112c0a50140.tar.xz perl-URPM-34d2d19b79c2ed4b7ff25798645c8112c0a50140.zip |
simplify (don't compute twice $_->fullname ne $p->fullname when we already
know $_->name ne $p->name)
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index f47b562..a2c30a4 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1012,10 +1012,9 @@ sub _handle_diff_provides { #- already installed. my @packages = find_candidate_packages_($urpm, $p->name, $state->{rejected}); @packages = - grep { ($_->name eq $p->name || + grep { ($_->name eq $p->name ? $_->fullname ne $p->fullname : $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release)) - && $_->fullname ne $p->fullname && - unsatisfied_requires($urpm, $db, $state, $_, name => $n) == 0 } + && unsatisfied_requires($urpm, $db, $state, $_, name => $n) == 0 } @packages; if (!@packages) { |