Red Hat Bugzilla – Bug 513729
is_flag_available() for PARTITION_LINUX_SWAP fails for DOS labels
Last modified: 2009-12-09 16:58:43 EST
Anaconda is getting this message:
The flag 'swap' is not available for msdos disklabels.
That exception message comes from libparted. Looking through libparted/labels/dos.c, I see that the is_flag_available() function for msdos labels returns false for swap. Some of the code has been added by a previous patch, but it looks like the rest of the file needs to have it added.
I created a patch for 1.9.0 and 1.8.8 and asked dlehman to test it out. It's not working from the anaconda end, but I think this is the right approach. Can you look at it from here?
I'll attach the two patches I made.
Created attachment 355117 [details]
Created attachment 355118 [details]
Seems pretty strait forward, Thx for the patch. You don't need the 1.8.8 anymore as upstream has officially released 1.9.0 and fedora has it from f12. This patch will be present in 1.9.0-8
This seems to have regressed in parted-1.9.0-14.fc12 (or earlier). Test in rawhide a week or so ago and trying to set swap on a partition results in a traceback saying the flag is unavailable on dos partition tables.
David's patch for 1.9.0 did not make msdos_partition_is_flag_available return
true for the swap flag which is causing this issue.
This is fixed in parted-1.9.0-16.fc12, which is available here:
A tag request to get this included for the beta is here:
Note I just did a parted-1.9.0-17.fc12 with another fix to Davids patch:
* Thu Oct 08 2009 Hans de Goede <firstname.lastname@example.org> 1.9.0-17
- Only change the partition type to 82 when setting the swap flag on dos
labels, not when resetting it
The tag request to get this included for the beta is still here:
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.
More information and reason for this action is here:
Long fixed now, closing.