summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-06-22 20:53:55 +0000
committerMatt Wilson <msw@redhat.com>2001-06-22 20:53:55 +0000
commit38fb6747f0c79f1f3be5732661005101a91f9aa6 (patch)
tree5612510935612ad569548b94883b3d62260c2345 /comps.py
parentb43b22451556077cf160799598e72b787e02af6c (diff)
downloadanaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.tar.gz
anaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.tar.xz
anaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.zip
protect from multiple header merges
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/comps.py b/comps.py
index 3e55c8d26..af4a1055f 100644
--- a/comps.py
+++ b/comps.py
@@ -139,9 +139,11 @@ class HeaderList:
return self.packages.values()
def mergeFullHeaders(self, file):
- fd = os.open(file, os.O_RDONLY)
- rpm.mergeHeaderListFromFD(self.hdlist, fd, 1000004)
- os.close(fd)
+ if not self.hasFullHeaders:
+ fd = os.open(file, os.O_RDONLY)
+ rpm.mergeHeaderListFromFD(self.hdlist, fd, 1000004)
+ os.close(fd)
+ self.hasFullHeaders = 1
def preordered(self):
preordered = 1
@@ -154,6 +156,7 @@ class HeaderList:
self.hdlist = hdlist
self.packages = {}
newCompat = []
+ self.hasFullHeaders = 0
for h in hdlist:
name = h[rpm.RPMTAG_NAME]
if noscore: