summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-29 16:38:01 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-29 16:38:01 +0000
commit54af8e3c8ffdad8bbad598fb933ca5b9409eaf56 (patch)
tree884f2b66a60c7b15611d9b52a425e7ebc8c9ad50
parent703e15460df5a35f4d3eb6b5646d12ad95b8477e (diff)
downloadanaconda-54af8e3c8ffdad8bbad598fb933ca5b9409eaf56.tar.gz
anaconda-54af8e3c8ffdad8bbad598fb933ca5b9409eaf56.tar.xz
anaconda-54af8e3c8ffdad8bbad598fb933ca5b9409eaf56.zip
throw out irrelevant arches early. related to #105005
-rw-r--r--hdrlist.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/hdrlist.py b/hdrlist.py
index de73a2622..f4625927a 100644
--- a/hdrlist.py
+++ b/hdrlist.py
@@ -92,6 +92,12 @@ def getLangs():
# basically, we generally prefer the shorter name with some special-case
# caveats.
def betterPackageForProvides(h1, h2):
+ # make sure we don't try to return a bogus arch
+ if h1 is not None and rhpl.arch.score(h1['arch']) == 0:
+ h1 = None
+ if h2 is not None and rhpl.arch.score(h2['arch']) == 0:
+ h2 = None
+
# if one is none, return the other
if h2 is None:
return h1
@@ -127,11 +133,7 @@ def betterPackageForProvides(h1, h2):
# same package names, which is a better arch?
score1 = rhpl.arch.score(h1['arch'])
score2 = rhpl.arch.score(h2['arch'])
- if score1 == 0:
- return h2
- elif score2 == 0:
- return h1
- elif (score1 < score2):
+ if (score1 < score2):
return h1
elif (score2 < score1):
return h2