import parted fails with ValueError: Invalid flag provided

Bug #1350946 reported by Pavel Roskin
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
pyparted (Ubuntu)
Invalid
Undecided
Rafael David Tinoco
Precise
Fix Released
Medium
Unassigned

Bug Description

[Impact]

 * This happens on the up-to-date Ubuntu 12.04.

 * All those using python-parted will suffer because of the change done in:
   https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1333462

[Test Case]

$ lsb_release -rd
Description: Ubuntu 12.04.5 LTS
Release: 12.04

parted: 2.3-8ubuntu5.2
python-parted: 3.6-4

$ python
Python 2.7.3 (default, Feb 27 2014, 20:00:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import parted
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/parted/__init__.py", line 60, in <module>
    from partition import Partition
  File "/usr/lib/python2.7/dist-packages/parted/partition.py", line 260, in <module>
    partitionFlag[__flag] = _ped.partition_flag_get_name(__flag)
ValueError: Invalid flag provided.
>>>

[Regression Potential]

 * Just rebuilding the package with new libparted ABI.
 * Python-parted is not working right now.
 * Users tested public PPA with this fix and said it is good.

[Other Info]

 * The symptoms are exactly the same as in bug 669931. However,
   the patch from that bug doesn't apply.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pyparted (Ubuntu):
status: New → Confirmed
Revision history for this message
Margarita Manterola (marga-9) wrote :

This issue happens with parted and libparted0debian1 version 2.3-8ubuntu5.2. A manual downgrade of those two packages to 2.3-8ubuntu5.1 makes the problem go away.

Revision history for this message
Fathi Boudra (fboudra) wrote :

I confirm, I reverted to older packages and it works as expected.

Revision history for this message
Pavel Roskin (proski) wrote :

_ped.partition_flag_get_name(__flag) fails when __flag is 15. But 15 should be allowed, it's PED_PARTITION_MSFT_DATA in /usr/include/parted/disk.h. I believe python-parted wasn't rebuilt when parted was updated. Indeed, requilding python-parted_3.6-4_i386.deb fixed the problem for me.

Changed in pyparted (Ubuntu):
assignee: nobody → Rafael David Tinoco (inaddy)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Working on it. Thank you for the feedback.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Since rebuilding python-parted fixed the issue for Proski (probably enum change from parted fix broke ABI with python-parted)...

I created a PPA containing same python-parted version but now rebuilt with already released parted_2.3-8ubuntu5.2.

Would you care to test this PPA's package:

# add-apt-repository ppa:inaddy/lp1350946
# apt-get update
# apt-get install python-parted

This will install the following package:

3.6-4ubuntu1~lp1350946~1

That is just a rebuild of the previous python-parted package.

Could you test it for me please ?

Thank you.

Revision history for this message
Fabi (fabi-2) wrote :

I just installed python-parted 3.6-4ubuntu1~lp1350946~1 from your PPA on a test machine and I'm no longer seeing the issue.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Thank you very much for the test. I'm creating the SRU proposal on this public bug then. It will be ready in a bit. People suffering for this issue can use this PPA temporarily while package does not get into -proposed.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Attaching SRU proposal (just a rebuild for the new libparted ABI) for python-parted.

description: updated
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Thank you very much. Subscribing SRU team so it can be uploaded.

description: updated
Changed in pyparted (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Changed in pyparted (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello proski, or anyone else affected,

Accepted pyparted into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/pyparted/3.6-4ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pyparted (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Pavel Roskin (proski) wrote :

I confirm that python-parted 3.6-4ubuntu1 fixes the bug.

Mathew Hodson (mhodson)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pyparted - 3.6-4ubuntu1

---------------
pyparted (3.6-4ubuntu1) precise; urgency=low

  * Fix needed for bug #1333462 broke ABI: a new partition flag was created.
  * Pyparted needs to be recompiled. (LP: #1350946)
 -- Rafael David Tinoco <email address hidden> Thu, 28 Aug 2014 10:48:37 -0700

Changed in pyparted (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for pyparted has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.