[PATCH 4/4] Make sure we teardown root candidates in all cases. (#693095)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The continue branches were not tearing down the devices or their
filesystems, which breaks stuff.
---
 pyanaconda/storage/__init__.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index d37b7f6..ff27c66 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1523,6 +1523,9 @@ def findExistingRootDevices(anaconda, upgradeany=False):
                 # This likely isn't our product, so don't even count it as
                 # notUpgradable.
                 continue
+            finally:
+                device.teardown(recursive=True)
+
             if arch is None:
                 # we failed to determine the arch (for instance when there is a
                 # corrupted rpm database on the target system)
@@ -1535,9 +1538,9 @@ def findExistingRootDevices(anaconda, upgradeany=False):
                 notUpgradable.append((product, version, device.name))
                 log.info("product %s version %s found on %s is not upgradable"
                          % notUpgradable[-1])
-
-        # this handles unmounting the filesystem
-        device.teardown(recursive=True)
+        else:
+            # this handles unmounting the filesystem
+            device.teardown(recursive=True)
 
     return (rootDevs, notUpgradable)
 
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux