[f23-branch 1/1] Don't teardown FSs when searching for installed systems (#1252902)

jkonecny12 installerbot-noreply at redhat.com
Mon Sep 14 12:14:21 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

When looking for existing installations the FSs are mounted to the
sysroot but if the device is protected it can't be teared down.

Umount the disks instead of teardown. The teardownAll() method is
used when all devices were tested.

Related: rhbz#1252902
---
 blivet/osinstall.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/blivet/osinstall.py b/blivet/osinstall.py
index 9615633..707b146 100644
--- a/blivet/osinstall.py
+++ b/blivet/osinstall.py
@@ -239,10 +239,11 @@ def _findExistingInstallations(devicetree):
             device.format.mount(options=options, mountpoint=getSysroot())
         except Exception: # pylint: disable=broad-except
             log_exception_info(log.warning, "mount of %s as %s failed", [device.name, device.format.type])
-            device.teardown()
+            device.format.umount(mountpoint=getSysroot())
             continue
 
         if not os.access(getSysroot() + "/etc/fstab", os.R_OK):
+            device.format.umount(mountpoint=getSysroot())
             device.teardown(recursive=True)
             continue
 
@@ -263,7 +264,7 @@ def _findExistingInstallations(devicetree):
                         {"product": product, "version": version, "arch": architecture}
 
         (mounts, swaps) = parseFSTab(devicetree, chroot=getSysroot())
-        device.teardown()
+        device.format.umount(mountpoint=getSysroot())
         if not mounts and not swaps:
             # empty /etc/fstab. weird, but I've seen it happen.
             continue


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/2420d6eb98c1b3e9289dc1e229f852392d0e6cec


More information about the anaconda-patches mailing list