def readHeaders(self):
isys.makeDevInode(self.device, '/tmp/' + self.device)
isys.mount('/tmp/' + self.device, "/tmp/hdimage",
fstype = self.fstype);
hl = []
path = "/tmp/hdimage" + self.path + "/RedHat/RPMS"
for n in os.listdir(path):
# no gurantee on suffix - do a copy onto msdos filesytem from
# linux and you don't get .rpm
# if (n[len(n) - 4:] == '.rpm'):
fd = os.open(path + "/" + n, 0)
try:
(h, isSource) = rpm.headerFromPackage(fd)
except:
continue
self.fnames[h] = n
hl.append(h)
os.close(fd)