summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-27 05:36:52 +0000
committerMatt Wilson <msw@redhat.com>1999-08-27 05:36:52 +0000
commitc7500ed7d38d3dfb2b90520a5ea544f4fbdaf514 (patch)
treed69dfa6d55952be667debd2dab6505cf6cfc8b2c /comps.py
parent797e45b30bc6a7cbfc835cf9743f3edf3b90e030 (diff)
downloadanaconda-c7500ed7d38d3dfb2b90520a5ea544f4fbdaf514.tar.gz
anaconda-c7500ed7d38d3dfb2b90520a5ea544f4fbdaf514.tar.xz
anaconda-c7500ed7d38d3dfb2b90520a5ea544f4fbdaf514.zip
fix for archscore
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/comps.py b/comps.py
index 54828cf75..2f9fc889d 100644
--- a/comps.py
+++ b/comps.py
@@ -40,13 +40,14 @@ class HeaderList:
self.packages = {}
for h in hdlist:
name = h[rpm.RPMTAG_NAME]
- if self.packages.has_key(name):
- score1 = rpm.archscore(h['arch'])
- score2 = rpm.archscore(self.packages[name].h['arch'])
- if (score1 < score2):
+ score1 = rpm.archscore(h['arch'])
+ if (score1):
+ if self.packages.has_key(name):
+ score2 = rpm.archscore(self.packages[name].h['arch'])
+ if (score1 < score2):
+ self.packages[name] = Package(h)
+ else:
self.packages[name] = Package(h)
- else:
- self.packages[name] = Package(h)
class HeaderListFromFile (HeaderList):