diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-22 20:53:55 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-22 20:53:55 +0000 |
commit | 38fb6747f0c79f1f3be5732661005101a91f9aa6 (patch) | |
tree | 5612510935612ad569548b94883b3d62260c2345 /comps.py | |
parent | b43b22451556077cf160799598e72b787e02af6c (diff) | |
download | anaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.tar.gz anaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.tar.xz anaconda-38fb6747f0c79f1f3be5732661005101a91f9aa6.zip |
protect from multiple header merges
Diffstat (limited to 'comps.py')
-rw-r--r-- | comps.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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: |