[PATCH] If dracut left the DVD mounted, don't try to remount it (#849152).
Chris Lumens
clumens at redhat.com
Fri Aug 17 20:04:42 UTC 2012
Trying to remount was causing an exception which meant the DVD got thrown
out as a possible installation source, so we were trying to use the network.
---
pyanaconda/packaging/yumpayload.py | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 5720e4c..64f91e8 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -550,16 +550,24 @@ reposdir=%s
url = method.url
sslverify = not (method.noverifyssl or flags.noverifyssl)
elif method.method == "cdrom" or not method.method:
- # cdrom or no method specified -- check for media
- device = opticalInstallMedia(storage.devicetree)
+ # Did dracut leave the DVD mounted for us?
+ device = get_mount_device("/run/install/repo")
if device:
- self._setUpMedia(device)
- self.install_device = device
- url = "file://" + INSTALL_TREE
+ self.install_device = storage.devicetree.getDeviceByPath(device)
+ url = "file:///run/install/repo"
if not method.method:
method.method = "cdrom"
- elif method.method == "cdrom":
- raise PayloadSetupError("no usable optical media found")
+ else:
+ # cdrom or no method specified -- check for media
+ device = opticalInstallMedia(storage.devicetree)
+ if device:
+ self._setUpMedia(device)
+ self.install_device = device
+ url = "file://" + INSTALL_TREE
+ if not method.method:
+ method.method = "cdrom"
+ elif method.method == "cdrom":
+ raise PayloadSetupError("no usable optical media found")
if method.method:
self._yum.preconf.releasever = self._getReleaseVersion(url)
--
1.7.11.2
More information about the anaconda-patches
mailing list