From aaf15ef3b12f83ee327e75413fa518a971d04858 Mon Sep 17 00:00:00 2001 From: Mike Fulbright Date: Tue, 30 Jul 2002 16:07:40 +0000 Subject: fix hdtree --- harddrive.py | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'harddrive.py') diff --git a/harddrive.py b/harddrive.py index 5a2e30100..5cca25b29 100644 --- a/harddrive.py +++ b/harddrive.py @@ -66,29 +66,19 @@ class OldHardDriveInstallMethod(InstallMethod): return cs def getFilename(self, h, timer): - return self.tree + self.path + "/RedHat/RPMS/" + self.fnames[h] + return self.tree + self.path + "/RedHat/RPMS/" + h[FILENAME] def readHeaders(self): self.mountMedia() - hl = [] - path = self.tree + self.path + "/RedHat/RPMS" - for n in os.listdir(path): - fd = os.open(path + "/" + n, 0) - try: - (h, isSource) = rpm.headerFromPackage(fd) - if (h and not isSource): - self.fnames[h] = n - hl.append(h) - except: - pass - os.close(fd) - + hl = HeaderListFromFile(self.tree + "/RedHat/base/hdlist") self.umountMedia() - return HeaderList(hl) - + return hl + def mergeFullHeaders(self, hdlist): - # since we read headers from the disk, we don't need to do this - pass + self.mountMedia() + hdlist.mergeFullHeaders(self.tree + "/RedHat/base/hdlist2") + self.umountMedia() + def systemMounted(self, fsset, chroot, selected): self.mountMedia() -- cgit