dcantrell / pyparted

Python bindings for GNU parted (libparted)
GNU General Public License v2.0
85 stars 42 forks source link

Support new PARTITION_TYPE features from parted 3.5 (#91) #92

Closed AdamWill closed 2 years ago

AdamWill commented 2 years ago

This adds constants for the new PARTITION_TYPE features added in parted 3.5 (commit 61b3a9733c0e0a79ccc43096642d378c8706add6 ) and adjusts the disk type tests to test for them correctly.

Note this relies on being able to evaluate the PED_DISK_TYPE_LAST_FEATURE macro at preprocessor time, which is not the case with current upstream parted. See https://github.com/dcantrell/pyparted/issues/91#issuecomment-1160788315 for full details on this. The existing attempts to add constants based on PED_PARTITION_LAST_FLAG in the same manner also do not work with current upstream parted.

Signed-off-by: Adam Williamson awilliam@redhat.com

dcantrell commented 2 years ago

Gah, I saw this PR after I worked up pretty much the same patch. Next time I'll look here first!

dcantrell commented 2 years ago

There are a few nits, but it's basically the same thing that I did and it appears we did it at the same time. I've pushed mine and am closing this.

AdamWill commented 2 years ago

I did it yesterday...and linked the issue from the bug, and the PR is linked from the issue...