diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-07-28 13:15:51 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-07-28 13:15:51 +0000 |
commit | 53d47517575dbe57541b353cf7a5a14f11a4b9d2 (patch) | |
tree | 03049be79ec5cbbf0150b2bb10d24956de9ac42b | |
parent | 4e1b93d8e18f451f76fd6f8c966c0fbeb3b8c56b (diff) | |
download | perl-URPM-53d47517575dbe57541b353cf7a5a14f11a4b9d2.tar perl-URPM-53d47517575dbe57541b353cf7a5a14f11a4b9d2.tar.gz perl-URPM-53d47517575dbe57541b353cf7a5a14f11a4b9d2.tar.bz2 perl-URPM-53d47517575dbe57541b353cf7a5a14f11a4b9d2.tar.xz perl-URPM-53d47517575dbe57541b353cf7a5a14f11a4b9d2.zip |
do not try to promote to an older package
Patch by Anssi Hannula, fixes bug #52460
When searching for possible promotions, _handle_diff_provides() allows
downgrade as well as upgrade.
However, downgrade is not currently supported, and will fail early in
_no_more_recent_installed_and_providing(), called from
resolve_requested__no_suggests_().
As no backtracking is done for early failures in this function (should it be?
dunno), the promotion gets forgotten and a failing transaction will occur.
Simple fix is to only allow upgrade before doing the promotion. Patch attached.
It introduces no regressions in urpmi or perl-URPM testsuite.
-rw-r--r-- | URPM/Resolve.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 279e58c..f10695c 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1238,7 +1238,7 @@ sub _handle_diff_provides { #- already installed. my @packages = find_candidate_packages_($urpm, $p->name, $state->{rejected}); @packages = - grep { ($_->name eq $p->name ? $_->fullname ne $p->fullname : + grep { ($_->name eq $p->name ? $p->compare_pkg($_) < 0 : $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release)) && (!strict_arch($urpm) || strict_arch_check($p, $_)) } @packages; |