SRU for hardy

Bug #237654 reported by Matthias Klose
6
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-central

python-central (0.6.7ubuntu0.1) hardy-proposed; urgency=low

  * Upload to hardy-proposed, dropping the following changes:
    - No debhelper v7 support.

python-central (0.6.7ubuntu1) intrepid; urgency=medium

  * Add a sequence file for debhelper v7 support.
  * Add infrastructure to remove generated files on upgrades to newer
    versions of a package not having files handled by python-central.
    See dh_pycentral(1).
-> Normally the symlinks are not removed on upgrades, to keep files
     available during upgrades. We need a way to remove these on upgrade
     to package not using pycentral in the future. This lets the preinst of a new version
     of a package drop a file, so that the symlinks are removed on upgrade in any
     case.
  * Properly remove symlinks and bytecode files for old python versions.
    Closes: #409390.
-> If a python version was marked as old, we didn't remove the symlinks
     and bytecode files.

python-central (0.6.6ubuntu1) intrepid; urgency=low

  * pycentral rtremove: Don't rely on the status of a package reading
    the status file, use dpkg-query instead. LP: #225927.
-> fixes an upgrade error (note that this goes away with a second upgrade
     run as well)
  * pycentral updatedefault: Call py_compilefiles with `-f' for private
    modules.
-> we can't rely on the timestamp, if we change the default python version
  * dh_pycentral: Install the preinst script for packages having
    private modules; really closes: #477180.
-> needed for updates with new or non-existing files in the new version.
  * dh_pycentral: Set Python-Version according to the public modules,
    if the package contains both private and public modules. Closes: #477566.
-> fix the Python-Version field for some corner cases.
  * pyversions.py: Don't rely on /usr/bin/python being a symlink.
    Closes: #450591.
-> Robustify upgrades, still checking for the correct python version.

TEST CASE #1:
 1) sudo rm /usr/bin/python && sudo cp /usr/bin/python2.5 /usr/bin/python
 2) with the hardy version of python-central installed, try to install any python-central-using package; e.g., python-daap
 3) observe that the package install fails with this error:
ValueError: the symlink /usr/bin/python does not point to the python default version. It must be reset to point to python2.5
 4) install the hardy-proposed version of python-central
 5) try again to install python-daap and observe that the install succeeds

TEST CASE #2:
 1) install the hardy-proposed version of python-central.
 2) install and remove the python-daap package. Verify that the removal completes successfully, and that no files are left behind matching the pattern /usr/lib/python2.*/site-packages/daap.*
 (this is a limited test case for the fix to removing symlinks associated with old versions of python on package removal; we can't properly test that functionality in hardy at present because the only "old" version of python available is python2.3 from dapper, but python-central does not exist in dapper, so we can only test for regressions in the usual removal functionality.)

Revision history for this message
Matthias Klose (doko) wrote :
Changed in python-central:
milestone: none → ubuntu-8.04.1
Revision history for this message
Steve Langasek (vorlon) wrote :

Matthias,

What is the SRU justification here, please? The only LP bug number referenced in the changelog other than this one is bug #225927, whereas there are a significant number of other changes mentioned in the changelog; and per my comments at the bottom of bug #225927, I don't think that bug itself warrants an SRU.

Steve Langasek (vorlon)
Changed in python-central:
milestone: ubuntu-8.04.1 → none
Revision history for this message
Matthias Klose (doko) wrote :

updated comment in 225927. sounds like pain if we can't fix an upgrade error.

please see the "->" comments in the changelog. these are not reviewed.

Changed in python-central:
milestone: none → ubuntu-8.04.1
Steve Langasek (vorlon)
Changed in python-central:
milestone: ubuntu-8.04.1 → none
Revision history for this message
Steve Langasek (vorlon) wrote :

> Normally the symlinks are not removed on upgrades, to keep files
> available during upgrades. We need a way to remove these on upgrade
> to package not using pycentral in the future. This lets the preinst of a new version
> of a package drop a file, so that the symlinks are removed on upgrade in any
> case.

Do I understand correctly that no packages will be uploaded to hardy that make use of this new functionality - it's only being added to ensure that packages in intrepid or later, which previously used python-central but no longer do, can rely on this functionality being present without having to have a versioned dependency on python-central? I'm ok with such an infrastructure change in SRU, as long as it's /only/ an infrastructure change and doesn't change any existing behavior.

Fix for Debian bug #409390 - self-explanatory, no objections to including a fix in SRU. (Wasn't there also a bug in LP about this same issue?)

Bug #225927 - ok, I wondered if this were a dpkg consistency question, but didn't realize this had been confirmed. Your proposed fix is definitely reasonable there.

> * pycentral updatedefault: Call py_compilefiles with `-f' for private
> modules.
> -> we can't rely on the timestamp, if we change the default python version

Is there a bug reference for this? I don't have enough context here to understand what this is about. What timestamp was being relied on?

> * dh_pycentral: Install the preinst script for packages having
> private modules; really closes: #477180.
> -> needed for updates with new or non-existing files in the new version.

Which change in the source does this correspond to? I don't see any changes in the diff that look like they fit this description.

The other changes don't look to me like they warrant inclusion in an SRU (one is a change to a build-time tool, and there's no mention here of packages that need to be rebuilt once these fixes are available; the other is a fix for /usr/bin/python not being a symlink, which it always is when using distribution packages), but I won't reject the SRU on those grounds either. But please answer the question in the preceding paragraph.

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

we can do the patches dealing with the upgrade scripts later; here is a reduced version of the update only addressing the runtime behaviour of pycentral.

> Is there a bug reference for this? I don't have enough context here to understand what this is about. What timestamp was being relied on?
no, when byte-compiling pycompilefile only builds the byte-code file, if the .pyc file is older than the .py file without looking at the version of the byte-code file.

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

> Which change in the source does this correspond to? I don't see any changes in the diff that look like they fit this description.

this is the last chunk of the patch to dh_pycentral.

Revision history for this message
Martin Pitt (pitti) wrote :

Looks generally sane to me now,I accepted the original upload. Matthias, can you please add some TEST CASE:s for verifying?

Changed in python-central:
status: New → Fix Committed
Steve Langasek (vorlon)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

I've added two test cases for two of the changes included in this SRU. Most of the other changes are not readily testable because they are changes to python-central's functionality as a build-dependency, so they can only be tested by building packages against python-central that include specific features.

I'm going ahead with copying this to hardy-proposed on the basis that these test cases have passed for me, that no other regressions have been reported against python-central in this time, and that we have a regression in hardy-updates, filed as bug #242554, which has resulted from aptoncd being copied to hardy-updates in advance of python-central.

Changed in python-central:
milestone: none → ubuntu-8.04.1
status: New → Fix Committed
status: Fix Committed → Fix Released
Changed in python-central:
status: Fix Committed → 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.