[master 6/21] Don't teardown FSs when searching for installed systems (#1252902)

vathpela installerbot-noreply at redhat.com
Wed Oct 7 20:50:41 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
(cherry picked from commit 05feef37e2c5ae8fd63abe2198ccd8d55e09b08a)
---
 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/97dabb15818c2bfa6db4f00bb4414f02ec159351


More information about the anaconda-patches mailing list