The following was filed automatically by anaconda: anaconda 13.26 exception report Traceback (most recent call first): File "/usr/lib64/python2.6/site-packages/parted/partition.py", line 161, in unsetFlag return self.__partition.set_flag(flag, 0) File "/usr/lib64/python2.6/site-packages/parted/decorators.py", line 30, in localeC ret = fn(*args, **kwds) File "<string>", line 2, in unsetFlag File "/usr/lib/anaconda/storage/devices.py", line 1221, in unsetFlag self.partedPartition.unsetFlag(flag) File "/usr/lib/anaconda/storage/deviceaction.py", line 271, in execute self.device.unsetFlag(flag) File "/usr/lib/anaconda/storage/devicetree.py", line 670, in processActions action.execute(intf=self.intf) File "/usr/lib/anaconda/storage/__init__.py", line 290, in doIt self.devicetree.processActions() File "/usr/lib/anaconda/packages.py", line 109, in turnOnFilesystems anaconda.storage.doIt() File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep rc = stepFunc(self.anaconda) File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext self.moveStep() File "/usr/lib/anaconda/gui.py", line 1311, in nextClicked self.anaconda.dispatch.gotoNext() PartitionException: Extended partitions cannot be hidden on msdos disk labels.
Created attachment 395377 [details] Attached traceback automatically from anaconda.
1. We are unsetting the flag. This is no time to complain about the flag being set. 2. Anaconda checks the return value of isFlagAvailable before calling unsetFlag. If the flag is not available don't say that it is.
pyparted gets this information from libparted. libparted needs to enforce its own rules. The msdos_partition_is_flag_available() needs to return false for PED_PARTITION_HIDDEN when the partition type is PED_PARTITION_EXTENDED. This prevents an exception in msdos_partition_set_flag() later. Change msdos_partition_get_flag() for consistency. diff -up parted-2.1/libparted/labels/dos.c.flag_available parted-2.1/libparted/labels/dos.c --- parted-2.1/libparted/labels/dos.c.flag_available 2010-02-25 03:35:47.000000000 -1000 +++ parted-2.1/libparted/labels/dos.c 2010-02-25 04:14:19.000000000 -1000 @@ -1481,7 +1481,10 @@ msdos_partition_get_flag (const PedParti dos_data = part->disk_specific; switch (flag) { case PED_PARTITION_HIDDEN: - return dos_data->hidden; + if (part->type == PED_PARTITION_EXTENDED) + return 0; + else + return dos_data->hidden; case PED_PARTITION_BOOT: return dos_data->boot; @@ -1512,6 +1515,10 @@ msdos_partition_is_flag_available (const { switch (flag) { case PED_PARTITION_HIDDEN: + if (part->type == PED_PARTITION_EXTENDED) + return 0; + else + return 1; case PED_PARTITION_BOOT: case PED_PARTITION_RAID: case PED_PARTITION_LVM:
Although I fully agree with comment #3, and I'll forward the patch upstream. That is not the real issue here. Note that this happens from ActionCreateFormat.execute(), iow we are trying to create a filesystem (or pv or raidmember) on the *extended* partition. This can mean 1 of 2 things: 1) There is an anaconda bug 2) The underlying libparted pedPartition object has been free-ed and the memory re-used, due to bug 567576. Causing parted to think this is an extended partition. I'm pretty sure 2 is the cause, so I'm marking this as a duplicate of bug 567576. *** This bug has been marked as a duplicate of bug 567576 ***