[PATCH] add setting of the exiting subvolume UUID for fstab

Gene Czarcinski gene at czarc.net
Sat Oct 26 20:13:41 UTC 2013


Earlier in BTRFSData, the BTRFS volume (the parent of all
subvolumes) is determined and assigned to "dev".  The value of
dev.uuid can be used to set the uuid value for the subvolume which,
in turn, will then be used in fstab.

This patch was tested as an updates img against Fedora 20 Beta TC6.
The current code works, this patch just makes it work a little better
by using the UUID.
---
 pyanaconda/kickstart.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index e6ed38d..4546e14 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -386,6 +386,8 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
                 raise KickstartValueError(formatErrorMsg(self.lineno, msg="Specified nonexistent BTRFS volume %s in btrfs command" % self.name))
 
             device.format.mountpoint = self.mountpoint
+            if dev:
+               device.format.uuid = dev.uuid # use the UUID from the parent (the BTRFS Volume)
         else:
             request = storage.newBTRFS(name=name,
                                        subvol=self.subvol,
-- 
1.8.3.1



More information about the anaconda-patches mailing list