[PATCH] Commit the new disk layout right away when initializing (#498602).

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

 



---
 storage/devices.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 8213379..bb724ed 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -709,6 +709,13 @@ class DiskDevice(StorageDevice):
                     if initcb is not None and initcb():
                         self.partedDisk = parted.freshDisk(device=self.partedDevice, \
                                 ty = platform.getPlatform(None).diskType)
+
+                        # If we've initialized the disk, we also need to commit
+                        # the change now.  At least on Macs, creating a new
+                        # disk label means we've also created a partition.  We
+                        # need the system to reflect that immediately.
+                        if self.partedDisk:
+                            self.partedDisk.commit()
                     else:
                         raise DeviceUserDeniedFormatError("User prefered to not format.")
 
-- 
1.6.1.3

_______________________________________________
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