package with no "Python-Version" can be half-installed but not removed

Bug #341014 reported by Michael Vogt
4
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
Undecided
Michael Vogt
Jaunty
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: python-central

A package with no "Python-Version" field causes pycentral to be in a inrecoverable state.

The half-installed package can not be removed:
$ sudo apt-get install python-ropemacs
The following NEW packages will be installed:
  python-ropemacs
0 upgraded, 1 newly installed, 0 to remove and 819 not upgraded.
Need to get 24,3kB of archives.
After this operation, 160kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com jaunty/universe python-ropemacs 0.6c2-3 [24,3kB]
Fetched 24,3kB in 0s (65,3kB/s)
Selecting previously deselected package python-ropemacs.
(Reading database ... 524815 files and directories currently installed.)
Unpacking python-ropemacs (from .../python-ropemacs_0.6c2-3_all.deb) ...
Setting up python-ropemacs (0.6c2-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 2096, in <module>
    main()
  File "/usr/bin/pycentral", line 2090, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1386, in run
    pkg.read_version_info()
  File "/usr/bin/pycentral", line 804, in read_version_info
    raise PyCentralError, "package has no field Python-Version"
__main__.PyCentralError: package has no field Python-Version
dpkg: error processing python-ropemacs (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-ropemacs
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo dpkg -r python-ropemacs
(Reading database ... 524830 files and directories currently installed.)
Removing python-ropemacs ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 2096, in <module>
    main()
  File "/usr/bin/pycentral", line 2090, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1550, in run
    pkg.read_version_info()
  File "/usr/bin/pycentral", line 804, in read_version_info
    raise PyCentralError, "package has no field Python-Version"
__main__.PyCentralError: package has no field Python-Version
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-ropemacs

Revision history for this message
Michael Vogt (mvo) wrote :

It also can not be upgraded to a fixed version because the prerm script fails (check dpkg-querry -s) and the new version is not available yet so it fails here too.

Revision history for this message
Michael Vogt (mvo) wrote :

fixes:
1. fail early
2. allow recovery from broken installs

Michael Vogt (mvo)
Changed in python-central:
assignee: nobody → mvo
status: New → In Progress
Michael Vogt (mvo)
Changed in python-central:
status: In Progress → Fix Released
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.