Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Update parted partition by sector, not name, after create. (#733449) (http://www.linux-archive.org/centos/571253-update-parted-partition-sector-not-name-after-create-733449-a.html)

David Lehman 09-02-2011 06:32 PM

Update parted partition by sector, not name, after create. (#733449)
 
---
pyanaconda/storage/devices.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index cf68b57..0491e1c 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -1484,12 +1484,14 @@ class PartitionDevice(StorageDevice):
raise

def _postCreate(self):
+ start = self.partedPartition.geometry.start
+ partition = self.disk.format.partedDisk.getPartitionBySector(s tart)
+ self.partedPartition = partition
if not self.isExtended:
# Ensure old metadata which lived in freespace so did not get
# explictly destroyed by a destroyformat action gets wiped
DeviceFormat(device=self.path, exists=True).destroy()

- self.partedPartition = self.disk.format.partedDisk.getPartitionByPath(sel f.path)
StorageDevice._postCreate(self)
self._currentSize = self.partedPartition.getSize()

--
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 02:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.