diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-08-28 00:25:37 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2009-08-28 08:25:35 +0200 |
commit | 3c6c236af903f113ac9397625ee43211e3be9c38 (patch) | |
tree | 46f6ec70273e6cc08f2602fe6d64785c6accdd1e /storage/formats/disklabel.py | |
parent | 66e59fe5f053520afc2f224eba042d2605bf9432 (diff) | |
download | anaconda-3c6c236af903f113ac9397625ee43211e3be9c38.tar.gz anaconda-3c6c236af903f113ac9397625ee43211e3be9c38.tar.xz anaconda-3c6c236af903f113ac9397625ee43211e3be9c38.zip |
Update PartitionDevice's partedPartition when the PartedDisks get reset
We use 2 in memory copies of the partition table (2 PartedDisk instances),
one which we manipulate while auto / manual partitioning, and one
copy on which we reply the changes done by the auto / manual partitioning
step by step (committing each step to the disk) as we process our
actions.
For pre-existing partitions the PartitionDevice's partedPartition member
would point to the manipulated table's partitions, even though we had
already switched over and where actually executing actions. This causes
issues (segfaults!) with the flag clearing in ActionDestroyFormat.execute(),
as this was now calling unsetFlag on a partition which is no longer part of
a disk (as it was removed by clearParts).
This patch fixes this by making PartitionDevice's partedPartition property
switch over to the partitions in the new PartedDisk after we've
switched over to it.
p.s.
For some reason in my case, the segfault kept getting caught be some handler
and retriggered, so I had to scp in strace to find out it was segfaulting,
this showed up as the installer hanging after
"executing action: Destroy Format None on .... (partition)"
So this patch might fix some bug reports with these symptoms
Diffstat (limited to 'storage/formats/disklabel.py')
-rw-r--r-- | storage/formats/disklabel.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py index 08e2461da..e4122fb83 100644 --- a/storage/formats/disklabel.py +++ b/storage/formats/disklabel.py @@ -233,8 +233,7 @@ class DiskLabel(DeviceFormat): constraint=constraint) def removePartition(self, partition): - rempart = self.partedDisk.getPartitionByPath(partition.path) - self.partedDisk.removePartition(rempart) + self.partedDisk.removePartition(partition) @property def extendedPartition(self): |