summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-11-22 17:00:25 +0000
committerErik Troan <ewt@redhat.com>2000-11-22 17:00:25 +0000
commit9024562267ca4674ed108b07cd5f4a80c07befd4 (patch)
tree49c232e9a5ce6d3604abd85eb00a935fbb3b072c
parentb18c6dcc92cd6b710dddb08ab92176103682fd94 (diff)
downloadanaconda-9024562267ca4674ed108b07cd5f4a80c07befd4.tar.gz
anaconda-9024562267ca4674ed108b07cd5f4a80c07befd4.tar.xz
anaconda-9024562267ca4674ed108b07cd5f4a80c07befd4.zip
added noscore bits
-rw-r--r--comps.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/comps.py b/comps.py
index 27b9e9d08..9225e0624 100644
--- a/comps.py
+++ b/comps.py
@@ -106,12 +106,15 @@ class HeaderList:
def list(self):
return self.packages.values()
- def __init__(self, hdlist, compatPackages = None):
+ def __init__(self, hdlist, compatPackages = None, noscore = 0):
self.hdlist = hdlist
self.packages = {}
newCompat = []
for h in hdlist:
name = h[rpm.RPMTAG_NAME]
+ if noscore:
+ self.packages[name] = Package(h)
+ continue
score1 = rpm.archscore(h['arch'])
if (score1):
if self.packages.has_key(name):
@@ -135,9 +138,10 @@ class HeaderList:
class HeaderListFromFile (HeaderList):
- def __init__(self, path, compatPackages = None):
+ def __init__(self, path, compatPackages = None, noscore = 0):
hdlist = rpm.readHeaderListFromFile(path)
- HeaderList.__init__(self, hdlist, compatPackages = compatPackages)
+ HeaderList.__init__(self, hdlist, compatPackages = compatPackages,
+ noscore = noscore)
class HeaderListFD (HeaderList):
def __init__(self, fd):