diff options
author | Mike Fulbright <msf@redhat.com> | 2003-03-24 20:48:06 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2003-03-24 20:48:06 +0000 |
commit | de090196197d5c0ee84caa1eb4048dbf5d31a775 (patch) | |
tree | 0acc0d4299199900d848fa493b4bbb6f77c94b70 /harddrive.py | |
parent | dd652f84b1e0de892e10e19ac75bd175230bece6 (diff) | |
download | anaconda-de090196197d5c0ee84caa1eb4048dbf5d31a775.tar.gz anaconda-de090196197d5c0ee84caa1eb4048dbf5d31a775.tar.xz anaconda-de090196197d5c0ee84caa1eb4048dbf5d31a775.zip |
removed hdtree method for good
Diffstat (limited to 'harddrive.py')
-rw-r--r-- | harddrive.py | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/harddrive.py b/harddrive.py index bd2083c2d..7d4045d81 100644 --- a/harddrive.py +++ b/harddrive.py @@ -26,99 +26,6 @@ from rhpl.log import log FILENAME = 1000000 -# Install from a set of files laid out on the hard drive like a CD -class OldHardDriveInstallMethod(InstallMethod): - def copyFileToTemp(self, filename): - wasmounted = self.isMounted - - if not wasmounted: - self.mountMedia() - tmppath = self.getTempPath() - path = tmppath + os.path.basename(filename) - shutil.copy(self.tree + "/" + filename, path) - - if not wasmounted: - self.umountMedia() - - return path - - def mountMedia(self): - if (self.isMounted): - raise SystemError, "trying to mount already-mounted image!" - - f = open("/proc/mounts", "r") - l = f.readlines() - f.close() - - for line in l: - s = string.split(line) - if s[0] == "/dev/" + self.device: - self.tree = s[1] + "/" - return - - isys.mount(self.device, "/tmp/hdimage", fstype = self.fstype, - readOnly = 1); - self.tree = "/tmp/hdimage/" - self.isMounted = 1 - - def umountMedia(self): - if self.isMounted: - isys.umount(self.tree) - self.tree = None - self.isMounted = 0 - - def readCompsViaMethod(self, hdlist): - self.mountMedia() - fname = self.findBestFileMatch(self.tree + self.path, 'comps.xml') - cs = ComponentSet(fname, hdlist) - self.umountMedia() - return cs - - def getFilename(self, h, timer): - return self.tree + self.path + "/RedHat/RPMS/" + h[FILENAME] - - def readHeaders(self): - self.mountMedia() - if not os.access(self.tree + "/RedHat/base/hdlist", os.R_OK): - self.umountMedia() - raise FileCopyException - hl = HeaderListFromFile(self.tree + self.path + "/RedHat/base/hdlist") - self.umountMedia() - return hl - - def mergeFullHeaders(self, hdlist): - self.mountMedia() - if not os.access(self.tree + "/RedHat/base/hdlist2", os.R_OK): - self.umountMedia() - raise FileCopyException - hdlist.mergeFullHeaders(self.tree + self.path + "/RedHat/base/hdlist2") - self.umountMedia() - - - def systemMounted(self, fsset, chroot, selected): - self.mountMedia() - - def filesDone(self): - # we're trying to unmount the source image at the end. if it - # fails, we'll reboot soon enough anyway - try: - self.umountMedia() - except: - log("unable to unmount media") - - def protectedPartitions(self): - rc = [] - rc.append(self.device) - return rc - - def __init__(self, device, type, path, rootPath): - InstallMethod.__init__(self, rootPath) - self.device = device - self.path = path - self.fstype = type - self.fnames = {} - self.isMounted = 0 - # Install from one or more iso images class HardDriveInstallMethod(InstallMethod): def copyFileToTemp(self, filename): |