[yum-cvs] yum: test/depsolvetests.py yum/depsolve.py

Seth Vidal skvidal at linux.duke.edu
Wed Jul 25 18:56:35 UTC 2007


 test/depsolvetests.py |  155 --------------------------------------------------
 yum/depsolve.py       |    3 
 2 files changed, 3 insertions(+), 155 deletions(-)

commit 341f0483aae3fdb6e5b7349294d25b54c0662107
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Wed Jul 25 14:48:23 2007 -0400

    make sure the first pkg in the 'newest' list isn't of an archscore of 0 from
    the requiring pkgs' arch. This will not play nicely with ppc/ppc64 in a couple
    of obscure situations where a ppc package may actually want a ppc64 package
    to satisfy its dep. As mind-boggling as that is.

diff --git a/yum/depsolve.py b/yum/depsolve.py
index 7fb211f..a42259d 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -580,6 +580,9 @@ class Depsolve(object):
             for po in newest[1:]:
                 if thisarch != 'noarch':
                     best_dist = archDifference(thisarch, best.arch)
+                    if best_dist == 0: # can't really use best's arch anyway...
+                        best = po # just try the next one - can't be much worse
+                        continue
                     po_dist = archDifference(thisarch, po.arch)
                     if po_dist > 0 and best_dist > po_dist:
                         best = po



More information about the Yum-cvs-commits mailing list