[blivet:rhel7/master 1/3] Find more used devices when calculating unused devices (#1043763)
mulhern
amulhern at redhat.com
Tue Feb 25 20:49:22 UTC 2014
From: David Lehman <dlehman at redhat.com>
Related: rhbz#1043763
Original commit message (cherry-picked from commit
a3bff73119413fb1ea49febfc0d58bf318003ad8):
Newly formatted devices are used unless mountpoint is empty. (#966078)
The previous algorithm was only including filesystems with mountpoints
and swap devices, ignoring new prepboot, biosboot, &c.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 6908b2a..c238b84 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -444,8 +444,10 @@ class Blivet(object):
used_devices.extend(device.ancestors)
for new in [d for d in self.devicetree.leaves if not d.format.exists]:
- if new in self.swaps or getattr(new.format, "mountpoint", None):
- used_devices.extend(new.ancestors)
+ if new.format.mountable and not new.format.mountpoint:
+ continue
+
+ used_devices.extend(new.ancestors)
for device in self.partitions:
if getattr(device, "isLogical", False):
--
1.8.3.1
More information about the anaconda-patches
mailing list