rtinstall scripts (to provide new 2.6 symlinks) are not run on intrepid->jaunty upgrade

Bug #353251 reported by Michael Vogt
8
Affects Status Importance Assigned to Milestone
python2.4 (Ubuntu)
Won't Fix
Undecided
Unassigned
Jaunty
Won't Fix
Undecided
Unassigned
python2.5 (Ubuntu)
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
python2.6 (Ubuntu)
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned
python3.0 (Ubuntu)
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned

Bug Description

Binary package hint: python-central

When installing python-fstab in a intrepid chroot and upgrading to jaunty the symlinks for python-fstab do not get updated for the python2.6 runtime. This means that:
$ python -c 'import fstab'
fail. This potentially affects more packages but I can confirm it with python-fstab. Attach is a debug log (with PYCENTRAL=debug). Here is a excerpt:

...
Setting up python2.6 (2.6.1-1ubuntu7) ...

Setting up python (2.6.1-0ubuntu9) ...
pycentral: pycentral updatedefault python2.5 python2.6
pycentral: update default: update 0 packages for python2.6

Setting up python-central (0.6.11ubuntu5) ...
...

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

It looks like the reason is that python-fstab is not touched (intrepid and jaunty version are the same) during the upgrade. This may also happen if a python package gets upgraded before the new runtime is unpacked I suspect.

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

Hm, the patch is bogus. It looks like python-central.rtinstall is not run. It does not appear in the log. But if I run it manually:

root@top:/# pycentral rtinstall python2.6
pycentral: pycentral rtinstall python2.6
pycentral: 3 packages with Python-Version info installed, 3 for python2.6
pycentral: support python-fstab for python2.6
pycentral: reading /usr/share/pyshared-data/python-fstab
pycentral: Using python-version from pkgconfig: all
pycentral: install package python-fstab
pycentral: link shared files python2.6/python-fstab
pycentral: byte-compile files (2/2) python2.6
pycentral: ['/usr/lib/python2.6/dist-packages/fstab-1.3.egg-info', '/usr/lib/python2.6/dist-packages/fstab.py']
pycentral: support update-manager-core for python2.6
pycentral: reading /usr/share/pyshared-data/update-manager-core
pycentral: Using python-version from pkgconfig: 2.6, 2.5
pycentral: install package update-manager-core
pycentral: byte-compile files (49/49) python2.6
pycentral: ['/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeApport.py', '/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeAptCdrom.py', '...']
pycentral: byte-compile files (5/5) python2.6
pycentral: ['/usr/share/computerjanitor/plugins/deb_plugin.py', '/usr/share/computerjanitor/plugins/dpkg_status_plugin.py', '...']
pycentral: support python-apt for python2.6
pycentral: reading /usr/share/pyshared-data/python-apt
pycentral: Using python-version from pkgconfig: 2.6, 2.5
pycentral: install package python-apt
pycentral: byte-compile files (12/12) python2.6
pycentral: ['/usr/lib/python2.6/dist-packages/apt/__init__.py', '/usr/lib/python2.6/dist-packages/apt/cache.py', '...']
root@top:/# find /usr/lib/python* -name "fstab.py"
/usr/lib/python2.5/site-packages/fstab.py
/usr/lib/python2.6/dist-packages/fstab.py

It looks ok.

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

python-minimal gets unpacked in line 343 that provides the updated debian_defaults file.

The python2.6-minimal postinst is run in line 280:
...
Selecting previously deselected package python2.6-minimal.^M
(Reading database ... 12964 files and directories currently installed.)^M
Unpacking python2.6-minimal (from .../python2.6-minimal_2.6.1-1ubuntu7_amd64.deb) ...^M
Setting up python2.6-minimal (2.6.1-1ubuntu7) ...^M
^M

So it seems like the rtinstall postinst thinks that 2.6 is not a supported runtime and does not bytecompile.

Revision history for this message
Michael Vogt (mvo) wrote :
Michael Vogt (mvo)
summary: - does not provide 2.6 symlinks for python-fstab (and others?) when
- python2.6 gets installed
+ rtinstall scripts (to provide new 2.6 symlinks) are not run on
+ intrepid->jaunty upgrade
Matthias Klose (doko)
affects: python-central (Ubuntu Jaunty) → python2.6 (Ubuntu Jaunty)
Changed in python3.0 (Ubuntu Jaunty):
importance: Undecided → High
status: New → In Progress
Changed in python2.6 (Ubuntu Jaunty):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.6 - 2.6.1-1ubuntu8

---------------
python2.6 (2.6.1-1ubuntu8) jaunty; urgency=low

  [Matthias Klose]
  * Update to 20090402, taken from the 2.6 release branch.
    - Fix issues #2625, #5068, #5387, #5536, #5561, #5619, #5632.
  * Address issues when working with PYTHONUSERBASE and non standard prefix
    (pointed out by Larry Hastings):
    - distutils.sysconfig.get_python_lib(): Only return ".../dist-packages" if
      prefix is the default prefix and if PYTHONUSERBASE is not set in the
      environment.
    - site.addusersitepackages(): Add USER_BASE/.../dist-packages to sys.path.
  * Do not add /usr/lib/pythonXY.zip on sys.path.

  [Marc Deslauriers]
  * debian/pyhtml2devhelp.py: update for python 2.6
  * debian/rules: re-enable documentation files for devhelp. LP: #338791.

  [Michael Vogt]
  * Fix missing rtinstall calls by inverting the supported/unsupported
    check. LP: #353251.

 -- Matthias Klose <email address hidden> Thu, 02 Apr 2009 17:34:21 +0200

Changed in python2.6 (Ubuntu Jaunty):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.0 - 3.0.1-0ubuntu10

---------------
python3.0 (3.0.1-0ubuntu10) jaunty; urgency=low

  [Matthias Klose]
  * Update to 20090402 from the release30-maint branch.
  * Address issues when working with PYTHONUSERBASE and non standard prefix
    (pointed out by Larry Hastings):
    - distutils.sysconfig.get_python_lib(): Only return ".../dist-packages" if
      prefix is the default prefix and if PYTHONUSERBASE is not set in the
      environment.
    - site.addusersitepackages(): Add USER_BASE/.../dist-packages to sys.path.
  * Do not add /usr/lib/pythonXY.zip on sys.path.
  * Use the default python to build the htmldocs. LP: #348118.

  [Marc Deslauriers]
  * debian/pyhtml2devhelp.py: update for sphinx generated documentation.
  * debian/rules: re-enable documentation files for devhelp.

  [Michael Vogt]
  * Fix missing rtinstall calls by inverting the supported/unsupported
    check. LP: #353251.

 -- Matthias Klose <email address hidden> Thu, 02 Apr 2009 19:05:29 +0200

Changed in python3.0 (Ubuntu Jaunty):
status: In Progress → Fix Released
Revision history for this message
Anders Kaseorg (andersk) wrote :

This fix seems to have caused the regression in bug 354251 (python3.0) and bug 354228 (python2.6).

Revision history for this message
Max Bowsher (maxb) wrote :

The fix is wrong because it doesn't consider the case the the relevant runtime not being contained in *any* category in /usr/share/python/debian_defaults.

Before: supported-versions was used as a whitelist
After: unsupported-versions is used as a blacklist

The current behaviour of python-central is to die if asked to install a runtime which is neither supported nor old - that behaviour needs to be considered here.

Changed in python3.0 (Ubuntu Jaunty):
status: Fix Released → In Progress
Revision history for this message
Heitzso (heitzso) wrote :

I have a tangled system due to this bug. I tried to upgrade from intrepid from console using aptitude dist-upgrade and the upgrade is severely (?) hung. I would appreciate a "fix" for those of us with hung/broken systems, i.e. what sequence of commands will get python2.6 working so all of the packages and upgrade systems depending on it can get back on track. I ack that the most important fix for the ubuntu team is to get the packages cleaned up so this does not happen. But please also post here instructions on untangling a broken upgrade. Thanks.

Revision history for this message
Max Bowsher (maxb) wrote :

Un-reopening, fixed by bug 354228.

Changed in python3.0 (Ubuntu Jaunty):
status: In Progress → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

I just ran into a interessting variant of this bug. It seems to be important in what order the packages get installed for them to be byte-compiled (done on a current jaunty chroot):

[chroot1]
# apt-get install python-distutils-extra
# apt-get install python2.4
# ls /usr/lib/python2.4/site-packages/
README

[chroot2]
# apt-get install python2.4
# apt-get install python-distutils-extra
# ls /usr/lib/python2.4/site-packages/
DistUtilsExtra README python_distutils_extra-0.90.egg-info

I think this will be fixed with the new python-central upload that fixes (#357884).

But there is still the inconsitency that the rtinstall scripts are not run when the new 2.4 runtime
gets installed (because of:
    if ! grep -sq '^supported-versions[^#]*python2.4' /usr/share/python/debian_defaults

But if a package gets (re)installed then pycentral creates the links for it. If its intentional, I find
it confusing :)

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

Closing the 2.5 task, that should be fine (its marked supported in both hardy and intrepid).

Changed in python2.5 (Ubuntu Jaunty):
status: New → Fix Released
Revision history for this message
kertib (kertib) wrote :

how do i fix it?

Revision history for this message
Matthias Klose (doko) wrote :

won't fix for python2.4

Changed in python2.4 (Ubuntu Jaunty):
status: New → Won't Fix
Changed in python2.4 (Ubuntu):
status: New → Won't Fix
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.