summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xanaconda4
-rw-r--r--backend.py19
-rw-r--r--constants.py5
-rw-r--r--flags.py1
-rw-r--r--yuminstall.py42
5 files changed, 50 insertions, 21 deletions
diff --git a/anaconda b/anaconda
index 7d10769a3..dd931d3d5 100755
--- a/anaconda
+++ b/anaconda
@@ -231,6 +231,7 @@ def parseOptions():
op.add_option("--nomount", dest="rescue_nomount", action="store_true", default=False)
op.add_option("--updates", dest="updateSrc", action="store", type="string")
op.add_option("--dogtail", dest="dogtail", action="store", type="string")
+ op.add_option("--dlabel", action="store_true", default=False)
# Deprecated, unloved, unused
op.add_option("-r", "--rootPath", dest="unsupportedMode",
@@ -658,6 +659,9 @@ if __name__ == "__main__":
# Default is to prompt to mount the installed system.
anaconda.rescue_mount = not opts.rescue_nomount
+ if opts.dlabel: #autodetected driverdisc in use
+ flags.dlabel = True
+
if opts.noipv4:
flags.useIPv4 = False
diff --git a/backend.py b/backend.py
index 5ddeb8cd7..8dd17a5ec 100644
--- a/backend.py
+++ b/backend.py
@@ -73,8 +73,8 @@ class AnacondaBackend:
def copyFirmware(self, anaconda):
# Multiple driver disks may be loaded, so we need to glob for all
- # the firmware files in all the driver disk directories.
- for f in glob.glob("/tmp/DD-*/firmware/*"):
+ # the firmware files in the common DD firmware directory
+ for f in glob.glob(DD_EXTRACTED+"/lib/firmware/*"):
try:
shutil.copyfile(f, "%s/lib/firmware/" % anaconda.rootPath)
except IOError, e:
@@ -94,15 +94,22 @@ class AnacondaBackend:
has_iscsi_disk = True
break
- if anaconda.id.extraModules:
- self.copyFirmware(anaconda)
+ #always copy the firmware files from DD
+ self.copyFirmware(anaconda)
if anaconda.id.extraModules or has_iscsi_disk:
for (n, arch, tag) in self.kernelVersionList(anaconda.rootPath):
packages.recreateInitrd(n, anaconda.rootPath)
- for d in glob.glob("/tmp/DD-*"):
- shutil.copytree(d, "/root/" + os.path.basename(d))
+ #copy RPMS
+ for d in glob.glob(DD_RPMS):
+ shutil.copytree(d, anaconda.rootPath + "/root/" + os.path.basename(d))
+
+ #copy modules and firmware
+ try:
+ shutil.copytree(DD_EXTRACTED, anaconda.rootPath + "/root/DD")
+ except IOError, e:
+ pass
storage.writeEscrowPackets(anaconda)
diff --git a/constants.py b/constants.py
index 9c4fbb12c..fb81c90dc 100644
--- a/constants.py
+++ b/constants.py
@@ -82,3 +82,8 @@ else:
# this string will be combined with "An unhandled exception"...
# the leading space is not a typo.
exceptionText += _(" against anaconda at %s") %(bugzillaUrl,)
+
+# DriverDisc Paths
+DD_EXTRACTED = "/tmp/DD"
+DD_RPMS = "/tmp/DD-*"
+
diff --git a/flags.py b/flags.py
index 17bc2e098..05e84e99a 100644
--- a/flags.py
+++ b/flags.py
@@ -69,6 +69,7 @@ class Flags:
self.__dict__['flags'] = {}
self.__dict__['flags']['test'] = 0
self.__dict__['flags']['livecdInstall'] = 0
+ self.__dict__['flags']['dlabel'] = 0
self.__dict__['flags']['ibft'] = 1
self.__dict__['flags']['iscsi'] = 0
self.__dict__['flags']['serial'] = 0
diff --git a/yuminstall.py b/yuminstall.py
index 2c4f15d99..de6197454 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -655,16 +655,18 @@ class AnacondaYum(YumSorter):
extraRepos = []
- if self.anaconda.id.extraModules:
- for d in glob.glob("/tmp/DD-*/rpms"):
- dirname = os.path.basename(os.path.dirname(d))
- rid = "anaconda-%s" % dirname
-
- repo = AnacondaYumRepo(rid)
- repo.baseurl = [ "file:///%s" % d ]
- repo.name = "Driver Disk %s" % dirname.split("-")[1]
- repo.enable()
- extraRepos.append(repo)
+ ddArch = os.uname()[4]
+
+ #Add the Driver disc repos to Yum
+ for d in glob.glob(DD_RPMS):
+ dirname = os.path.basename(d)
+ rid = "anaconda-%s" % dirname
+
+ repo = AnacondaYumRepo(rid)
+ repo.baseurl = [ "file:///%s" % d ]
+ repo.name = "Driver Disk %s" % dirname.split("-")[1]
+ repo.enable()
+ extraRepos.append(repo)
if self.anaconda.isKickstart:
# This is the same pattern as from loader/urls.c:splitProxyParam.
@@ -1294,19 +1296,29 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
def selectModulePackages(self, anaconda, kernelPkgName):
(base, sep, ext) = kernelPkgName.partition("-")
+ moduleProvides = []
+
for (path, name) in anaconda.id.extraModules:
if ext != "":
- moduleProvides = "dud-%s-%s" % (name, ext)
+ moduleProvides.append("dud-%s-%s" % (name, ext))
+ else:
+ moduleProvides.append("dud-%s" % name)
+
+ #We need to install the packages which contain modules from DriverDiscs
+ for modPath in isys.modulesWithPaths():
+ if modPath.startswith(DD_EXTRACTED):
+ moduleProvides.append(modPath[len(DD_EXTRACTED):])
else:
- moduleProvides = "dud-%s" % name
+ continue
- pkgs = self.ayum.returnPackagesByDep(moduleProvides)
+ for module in moduleProvides:
+ pkgs = self.ayum.returnPackagesByDep(module)
if not pkgs:
- log.warning("Didn't find any package providing module %s" % name)
+ log.warning("Didn't find any package providing %s" % module)
for pkg in pkgs:
- log.info("selecting package %s for module %s" % (pkg.name, name))
+ log.info("selecting package %s for %s" % (pkg.name, module))
self.ayum.install(po=pkg)
def selectBestKernel(self, anaconda):