summaryrefslogtreecommitdiffstats
path: root/harddrive.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-06-26 21:22:06 +0000
committerMike Fulbright <msf@redhat.com>2003-06-26 21:22:06 +0000
commite3b243ebb778ea2521f27532c6e16b8e4f503e60 (patch)
tree73db24795ba17b49b25f3e12c7294f0d4fa3158d /harddrive.py
parent727beab943c7552df88093941d740a051ed397e1 (diff)
downloadanaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.tar.gz
anaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.tar.xz
anaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.zip
Changed how we acquire release notes so that we now try to pull it for all install methods. Have tested on all installmethods but CDROM. Only shortcoming presently is 1) It mount/umount the HD image loopback alot of times in process finding the matching file for your lang (we try lots of variations), and 2) lots of IOError warnings on VC3 for HTTP installs for same reason.
Diffstat (limited to 'harddrive.py')
-rw-r--r--harddrive.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/harddrive.py b/harddrive.py
index 1ad7840de..a946b4594 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -103,7 +103,35 @@ class HardDriveInstallMethod(InstallMethod):
self.umountMedia()
return cs
- def getFilename(self, h, timer, callback=None):
+ # return reference to file specified on ISO #1
+ #
+ # mounts ISO #1, copies file to destdir, umounts ISO #1
+ #
+ # will probably do bad things if called during package installation
+ #
+ # returns None if file doesn't exist
+ def getFilename(self, filename, callback=None, destdir=None, retry=1):
+ if destdir is None:
+ tmppath = self.getTempPath()
+ else:
+ tmppath = destdir
+
+ fn = tmppath + '/' + os.path.basename(filename)
+
+ self.mountMedia(1)
+ try:
+ shutil.copy(self.tree + '/' + filename, fn)
+ except:
+ fn = None
+
+ self.umountMedia()
+
+ return fn
+
+
+ # return reference to the RPM file specified by the header
+ # will mount the appropriate ISO image as required by CD # in header
+ def getRPMFilename(self, h, timer, callback=None):
if self.mediaIsMounted != h[1000002]:
self.umountMedia()
self.mountMedia(h[1000002])