summaryrefslogtreecommitdiffstats
path: root/harddrive.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-14 19:36:32 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-14 19:36:32 +0000
commit60a8f9866e39b0eb0f5f0e15057f36679d007522 (patch)
treee86d39f59a06ada627d57addf02b31810730853d /harddrive.py
parent6af42d3070c2528db2c3fb47a3613e150ef1c449 (diff)
downloadanaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.tar.gz
anaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.tar.xz
anaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.zip
read product path from the build stamp if possible, default to RedHat if not
available. basically notting's patch with some fixes and genhdlist handled
Diffstat (limited to 'harddrive.py')
-rw-r--r--harddrive.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/harddrive.py b/harddrive.py
index 92c3f8bb1..dfa020d8e 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -24,6 +24,7 @@ import rpm
import string
from rhpl.translate import _, cat, N_
from rhpl.log import log
+from constants import *
FILENAME = 1000000
@@ -138,14 +139,14 @@ class HardDriveInstallMethod(InstallMethod):
self.umountMedia()
self.mountMedia(h[1000002])
- return self.tree + "/RedHat/RPMS/" + h[1000000]
+ return "%s/%s/RPMS/%s" % (self.tree, productPath, h[1000000])
def readHeaders(self):
self.mountMedia(1)
- if not os.access(self.tree + "/RedHat/base/hdlist", os.R_OK):
+ if not os.access("%s/%s/base/hdlist" % (self.tree, productPath), os.R_OK):
self.umountMedia()
raise FileCopyException
- hl = HeaderListFromFile(self.tree + "/RedHat/base/hdlist")
+ hl = HeaderListFromFile("%s/%s/base/hdlist" % (self.tree, productPath))
self.umountMedia()
# Make sure all of the correct CD images are available
@@ -169,10 +170,10 @@ class HardDriveInstallMethod(InstallMethod):
def mergeFullHeaders(self, hdlist):
self.mountMedia(1)
- if not os.access(self.tree + "/RedHat/base/hdlist", os.R_OK):
+ if not os.access("%s/%s/base/hdlist" % (self.tree, productPath), os.R_OK):
self.umountMedia()
raise FileCopyException
- hdlist.mergeFullHeaders(self.tree + "/RedHat/base/hdlist2")
+ hdlist.mergeFullHeaders("%s/%s/base/hdlist2" % (self.tree, productPath))
self.umountMedia()
def systemMounted(self, fsset, mntPoint):