[PATCH 6/6] Support rootpath overrides in fsset.rootDevice (#519665)

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

 



If you override rootpath on the anaconda command line, the rootDevice
property will return None because it's looking for a device with mount
point "/" rather than the path you passed to --rootpath.
---
 storage/__init__.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 10fe07a..3a36c78 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1799,13 +1799,18 @@ 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
 
-            if mountpoint == "/":
+            if mountpoint == rootpath:
                 return device
 
     @property
-- 
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