python-central crash on upgrade (was: python2.4-minimal could not be uninstalled)

Bug #205470 reported by Leonardo Gastón De Luca
84
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
High
Matthias Klose

Bug Description

Binary package hint: update-manager

I got this error in the "cleaning" phase of the update from kubuntu gutsy to kubuntu hardy

Unlinking and removing bytecode for runtime python2.4
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1813, in <module> main()
  File "/usr/bin/pycentral", line 1807, in main rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1478, in run pkg = DebPackage('package', pkgname)
  File "/usr/bin/pycentral", line 292, in __init__ self.read_pyfiles()
  File "usr/bin/pycentral", line 330, in read_pyifiles lines = map(string.strip, open('/var/lib/dpkg/info/%s.list' %self.name).readlines())
IOError: [Errno 2] No such file or directory: '/var/lib/dpkg/info/python-xml.list'
dpkg: error al procesar python2.4-minimal (--remove) el subproceso pre-removal script devolvió el código de salida de error 1

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

Thanks for your bugreport.

This looks like a problem in the python-central pacakge, I ressign. To get a better idea what went wrong, could you please attach the file /var/log/dist-upgrade/term.log to this bugreport too?

Changed in update-manager:
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Leonardo Gastón De Luca (leorockway) wrote :

Here is my term.log

Revision history for this message
Scott Kitterman (kitterman) wrote :

Clearly python-central shouldn't crash here, but it appears that python-xml was unexpectedly removed due to python2.4 being removed. Generically, python2.4 shouldn't be removed. Earlier in log python2.4 was upgraded and configured.

Colin Watson (cjwatson)
Changed in python-central:
assignee: nobody → doko
Revision history for this message
James Westby (james-w) wrote :

Hi,

The code in question seems to be:

    def run(self, global_options):
        packages = [(p, v) for p, v in read_dpkg_status()
                    if not p in (self.rtname, self.rtname+'-minimal')]
        needed_packages = []
        for pkgname, vstring in packages:
            try:
                requested = list(pyversions.requested_versions(vstring, version_only=True))
            except ValueError:
                logging.info('\tunsupported for %s: %s (%s)' % (self.rtname, pkgname, vstring))
                continue
            if self.runtime.short_name in requested:
                needed_packages.append((pkgname, vstring, requested))
        logging.info('\t%d pycentral supported packages installed, %d for %s'
                     % (len(packages), len(needed_packages), self.rtname))
        try:
            for pkgname, vstring, vinfo in needed_packages:
                logging.info('\trtremove: remove package %s for %s' % (pkgname, self.rtname))
                pkg = DebPackage('package', pkgname)

where the call to DebPackage looks for the /var/lib/dpkg/package.list file. The read_dpkg_status()
function reads /var/lib/dpkg/status for the packages that depend on python-central to get
their requested python versions.

I don't know how dpkg handles these files, if you are removing a package is there a window
in which the files are removed (in particular /var/lib/dpkg/package.list), but the
package is still listed in /var/lib/dpkg/status?

Thanks,

James

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 205470] Re: python-central crash on upgrade (was: python2.4-minimal could not be uninstalled)

On Fri, Apr 04, 2008 at 10:53:45AM -0000, James Westby wrote:

> where the call to DebPackage looks for the /var/lib/dpkg/package.list
> file. The read_dpkg_status() function reads /var/lib/dpkg/status for the
> packages that depend on python-central to get their requested python
> versions.

> I don't know how dpkg handles these files, if you are removing a package
> is there a window in which the files are removed (in particular
> /var/lib/dpkg/package.list), but the package is still listed in
> /var/lib/dpkg/status?

Packages that are in state "rc" (removed, config-files) are certainly
present in /var/lib/dpkg/status but may have an empty
/var/lib/dpkg/info/$package.list if the package ships no conffiles but has
a postrm script.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

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

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

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

  * pycentral rtremove: Do not work on removed, but not purged packages.
    LP: #205470.
  * pycentral pkgprepare: Create the directory before creating a symlink
    there; not yet done when the package install previously failed and
    was retried. LP: #201978.

 -- Matthias Klose <email address hidden> Fri, 04 Apr 2008 14:38:03 +0200

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

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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