--- pyanaconda/constants.py | 2 +- pyanaconda/packaging/yumpayload.py | 4 ++-- pyanaconda/ui/gui/spokes/source.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py index c4c0007..7ff5020 100644 --- a/pyanaconda/constants.py +++ b/pyanaconda/constants.py @@ -78,7 +78,7 @@ ANACONDA_CLEANUP = "anaconda-cleanup" ROOT_PATH = "/mnt/sysimage" MOUNT_DIR = "/mnt/install" DRACUT_REPODIR = "/run/install/repo" -DRACUT_ISODIR = "/run/install/isodir" +DRACUT_ISODIR = "/run/install/source" ISO_DIR = MOUNT_DIR + "/isodir" INSTALL_TREE = MOUNT_DIR + "/source" BASE_REPO_NAME = "anaconda" diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 0c5ea8c..f1de826 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -500,11 +500,11 @@ reposdir=%s if not self.data.method.method == "harddrive": return None # This could either be mounted to INSTALL_TREE or on - # DRACUT_REPODIR if dracut did the mount. + # DRACUT_ISODIR if dracut did the mount. dev = get_mount_device(INSTALL_TREE) if dev: return dev[len(ISO_DIR)+1:] - dev = get_mount_device(DRACUT_REPODIR) + dev = get_mount_device(DRACUT_ISODIR) if dev: return dev[len(DRACUT_ISODIR)+1:] return None diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 33518b5..3e940ef 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -459,7 +459,8 @@ class SourceSpoke(NormalSpoke):
self.data.method.method = "harddrive" self.data.method.partition = part.name - self.data.method.dir = self._currentIsoFile + # The / gets stripped off by payload.ISOImage + self.data.method.dir = "/" + self._currentIsoFile if (old_source.method == "harddrive" and old_source.partition == self.data.method.partition and old_source.dir == self.data.method.dir):
We've previously only been excluding protected devices, but we really want to exclude any device with a protected child on it. --- pyanaconda/ui/gui/spokes/storage.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index e5bb10b..f43c521 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -90,11 +90,15 @@ class FakeDisk(object): def description(self): return "%s %s" % (self.vendor, self.model)
+def hasProtectedPartition(devicetree, disk): + return any(map(lambda dep: dep.protected, devicetree.getChildren(disk))) + def getDisks(devicetree, fake=False): if not fake: devices = devicetree.devices + devicetree._hidden disks = [d for d in devices if d.isDisk and not d.format.hidden and + not hasProtectedPartition(devicetree, d) and not (d.protected and d.removable)] else:
On Mon, 2012-12-03 at 11:59 -0500, Chris Lumens wrote:
We've previously only been excluding protected devices, but we really want to exclude any device with a protected child on it.
This makes it impossible to install to a single-disk system using hdiso.
That code is explicitly checking for a combination of protected and removable. The disk containing the live backing device should also be protected, so it seems to me that either that bit is broken or else the device is not showing up as removable.
This makes it impossible to install to a single-disk system using hdiso.
That code is explicitly checking for a combination of protected and removable. The disk containing the live backing device should also be protected, so it seems to me that either that bit is broken or else the device is not showing up as removable.
Okay, I'll drop that patch for now.
- Chris
On Mon, 2012-12-03 at 11:59 -0500, Chris Lumens wrote:
pyanaconda/constants.py | 2 +- pyanaconda/packaging/yumpayload.py | 4 ++-- pyanaconda/ui/gui/spokes/source.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py index c4c0007..7ff5020 100644 --- a/pyanaconda/constants.py +++ b/pyanaconda/constants.py @@ -78,7 +78,7 @@ ANACONDA_CLEANUP = "anaconda-cleanup" ROOT_PATH = "/mnt/sysimage" MOUNT_DIR = "/mnt/install" DRACUT_REPODIR = "/run/install/repo" -DRACUT_ISODIR = "/run/install/isodir" +DRACUT_ISODIR = "/run/install/source" ISO_DIR = MOUNT_DIR + "/isodir" INSTALL_TREE = MOUNT_DIR + "/source" BASE_REPO_NAME = "anaconda" diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 0c5ea8c..f1de826 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -500,11 +500,11 @@ reposdir=%s if not self.data.method.method == "harddrive": return None # This could either be mounted to INSTALL_TREE or on
# DRACUT_REPODIR if dracut did the mount.
# DRACUT_ISODIR if dracut did the mount. dev = get_mount_device(INSTALL_TREE) if dev: return dev[len(ISO_DIR)+1:]
dev = get_mount_device(DRACUT_REPODIR)
dev = get_mount_device(DRACUT_ISODIR) if dev: return dev[len(DRACUT_ISODIR)+1:] return Nonediff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 33518b5..3e940ef 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -459,7 +459,8 @@ class SourceSpoke(NormalSpoke):
self.data.method.method = "harddrive" self.data.method.partition = part.name
self.data.method.dir = self._currentIsoFile
# The / gets stripped off by payload.ISOImageself.data.method.dir = "/" + self._currentIsoFile if (old_source.method == "harddrive" and old_source.partition == self.data.method.partition and old_source.dir == self.data.method.dir):
This one looks good to me.
anaconda-patches@lists.fedorahosted.org