"pycentral rtinstall" script does not add symlinks for python2.6 on upgrade

Bug #357884 reported by Michael Vogt
6
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned

Bug Description

Binary package hint: python-central

After python2.6 gets installed and the rtinstall script is run for python-central, no symlinks are installed for packages that have the same version in intrepid and jaunty. I tested this with python-fstab in a chroot from intrepid->jaunty (and in a kvm upgrade tester). I will attach the full upgrade log with PYCENTRAL=debug.

Here are the revlevant lines:
...
Setting up python2.6-minimal (2.6.2~rc1-0ubuntu1) ...
pycentral: pycentral rtinstall --ignore-errors=yes python2.6
INFO: using unknown version '/usr/bin/python2.6' (debian_defaults not up-to-date?)
pycentral: 1 packages with Python-Version info installed, 0 for python2.6
...

If I run the same command ("pycentral rtinstall --ignore-errors=yes python2.6") after the upgrade the fstab symlinks get created.

Michael Vogt (mvo)
summary: - rtinstall script does not add symlinks for python2.6
+ "pycentral rtinstall" script does not add symlinks for python2.6
summary: - "pycentral rtinstall" script does not add symlinks for python2.6
+ "pycentral rtinstall" script does not add symlinks for python2.6 on
+ upgrade
Revision history for this message
Michael Vogt (mvo) wrote :

I think the problem is that rtinstall calls "requested_versions()" and that calls:
    supported = supported_versions(version_only=True)
so it runs into the problem that /usr/share/python/debian_defaults are not listing python2.6 when
the rtinstall script is run (because this file is part of python-minimal and at the intrepid version
when python2.6-minimal gets installed).

If we would reverse the logic to byte-compile everything that is not explictely unsupported that
would byte-compile python3.0 (with lots of failures) as well.

Changed in python-central (Ubuntu Jaunty):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

A possible solution is to have a python-common package that contains the debian_defaults file. python-minimal would depend on it (unversionized). python2.6-minimal would depends on it with a versionized dependency to ensure it gets the updated debian_defaults file before the postinst is run. This needs to be tested of course.

Revision history for this message
Colin Watson (cjwatson) wrote :

Why do we need to consider the supported Python versions at all in this case? When python2.6 is installed, shouldn't we just byte-compile things for python2.6 without protesting? (Yes, C extensions won't be available, but I don't get why we shouldn't make what modules we can available when you install pythonX.Y.)

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

Here is a possible patch:

=== modified file 'debian/changelog'
--- debian/changelog 2009-04-03 08:13:53 +0000
+++ debian/changelog 2009-04-15 14:11:26 +0000
@@ -1,3 +1,13 @@
+python-central (0.6.11ubuntu7) jaunty; urgency=low
+
+ * When the rtinstall action runs, do not check the support
+ status of the runtime but byte-compile anyway. This fixes
+ the problem that python2.6-minimal gets installed before
+ the /usr/share/python/debian_defaults file gets updated
+ and has python2.6 as supported (LP: #357884)
+
+ -- Michael Vogt <email address hidden> Wed, 15 Apr 2009 16:09:42 +0200
+
 python-central (0.6.11ubuntu6) jaunty; urgency=low

   * fix logic in get_installed_runtime() to not error when a

=== modified file 'pycentral.py'
--- pycentral.py 2009-04-03 10:03:05 +0000
+++ pycentral.py 2009-04-15 14:33:34 +0000
@@ -1718,6 +1718,9 @@
         for pkgname, vstring in packages:
             try:
                 requested = list(pyversions.requested_versions(vstring, version_only=True))
+ if not self.rtname[6:] in requested:
+ logging.info("%s not in what requested_versions() returned, adding it anyway" % self.rtname)
+ requested.append(self.rtname[6:])
             except ValueError:
                 logging.info('\tunsupported for %s: %s (%s)' % (self.rtname, pkgname, vstring))
                 continue

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

This bug was fixed in the package python-central - 0.6.11ubuntu7

---------------
python-central (0.6.11ubuntu7) jaunty; urgency=low

  * When the rtinstall action runs, do not check the support
    status of the runtime but byte-compile anyway. This fixes
    the problem that python2.6-minimal gets installed before
    the /usr/share/python/debian_defaults file gets updated
    and has python2.6 as supported (LP: #357884)

 -- Michael Vogt <email address hidden> Wed, 15 Apr 2009 16:09:42 +0200

Changed in python-central (Ubuntu Jaunty):
status: Triaged → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

This particular implementation is not the proper fix, it breaks installation of python2.5 when some packages which only support python2.6 and later get installed; see bug #412338.

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.