[PATCH] Handle rootPath referencing a chroot value or actual path (#519665)

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

 



Still related to #519665, but account for anaconda.rootPath containing
the chroot value passed to the mount() method on the format.  But for
install types as indicated in the bug, rootPath will be the actual path.
---
 storage/__init__.py |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 81dd06d..ba20483 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1763,19 +1763,15 @@ class FSSet(object):
 
     @property
     def rootDevice(self):
-        rootpath = self.rootpath
-
-        if not rootpath:
-            rootpath = "/"
-
-        for device in self.devices:
-            try:
-                mountpoint = device.format.mountpoint
-            except AttributeError:
-                mountpoint = None
+        for path in ["/", self.rootpath]:
+            for device in self.devices:
+                try:
+                    mountpoint = device.format.mountpoint
+                except AttributeError:
+                    mountpoint = None
 
-            if mountpoint == rootpath:
-                return device
+                if mountpoint == "/":
+                    return device
 
     @property
     def migratableDevices(self):
-- 
1.6.2.5

_______________________________________________
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