dapper->hardy crashes in pre-inst script

Bug #198456 reported by Michael Vogt on 2008-03-04
2
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
High
Michael Vogt

Bug Description

Binary package hint: python-central

This happens on a dapper->hardy upgrade. For most of the other python packages too:

Preparing to replace deskbar-applet 2.14.1.1-0ubuntu3 (using .../deskbar-applet_2.21.92-0ubuntu2_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1702, in ?
    main()
  File "/usr/bin/pycentral", line 1696, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1154, in run
    runtimes = get_installed_runtimes()
  File "/usr/bin/pycentral", line 200, in get_installed_runtimes
    default_version = pyversions.default_version(version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 139, in default_version
    if not _default_version in (debian_default, os.path.join('/usr/bin', debian_default)):
  File "/usr/lib/python2.4/posixpath.py", line 60, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
dpkg: error processing /var/cache/apt/archives/deskbar-applet_2.21.92-0ubuntu2_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1

Michael Vogt (mvo) on 2008-03-04
Changed in python-central:
importance: Undecided → High
milestone: none → ubuntu-8.04-beta
status: New → Confirmed
Michael Vogt (mvo) wrote :

The error output of the automatic upgrade tester with debug enabled:

dpkg: error processing /var/cache/apt/archives/deskbar-applet_2.21.92-0ubuntu2_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
+ set -e
+ which pycentral
+ pycentral --help
+ grep -q pkgprepare
+ pycentral pkgprepare deskbar-applet
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1702, in ?
    main()
  File "/usr/bin/pycentral", line 1696, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1154, in run
    runtimes = get_installed_runtimes()
  File "/usr/bin/pycentral", line 200, in get_installed_runtimes
    default_version = pyversions.default_version(version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 139, in default_version
    if not _default_version in (debian_default, os.path.join('/usr/bin', debian_default)):
  File "/usr/lib/python2.4/posixpath.py", line 60, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Michael Vogt (mvo) wrote :

There is no /usr/share/python/debian_defaults on the system when the crash happens, that makes read_defaults() return "None" and that crashes the preinst script.

Michael Vogt (mvo) wrote :

This patch changes it to not crash if no /usr/share/python/debian_defaults is on the
system and assume python2.4 then. That was the last version of python-minimal
without this file so the assumption should be safe.

Cheers,
Michael

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-central - 0.5.62ubuntu2

---------------
python-central (0.5.62ubuntu2) hardy; urgency=low

  * Do not crash if no /usr/share/python/debian_defaults is on the
    system and assume python2.4 then. That was the last version
    without this file (LP: #198456)

 -- Michael Vogt <email address hidden> Tue, 04 Mar 2008 19:44:20 +0100

Changed in python-central:
status: Confirmed → Fix Released
Michael Vogt (mvo) wrote :

Hm, my previous fix is not enough, I'm going to upload another one.

Changed in python-central:
assignee: nobody → mvo
status: Fix Released → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-central - 0.5.62ubuntu3

---------------
python-central (0.5.62ubuntu3) hardy; urgency=low

  * If "/usr/share/python/debian_defaults" does not exists,
    raise a ValueError in read_default() (LP: #198456)

 -- Michael Vogt <email address hidden> Wed, 05 Mar 2008 15:26:28 +0100

Changed in python-central:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers