Merge lp:~mvo/launchpad/maintenance-check-precise into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Graham Binns on 2012-01-03 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 14623 |
| Proposed branch: | lp:~mvo/launchpad/maintenance-check-precise |
| Merge into: | lp:launchpad |
| Diff against target: |
210 lines (+90/-48) 1 file modified
cronscripts/publishing/maintenance-check.py (+90/-48) |
| To merge this branch: | bzr merge lp:~mvo/launchpad/maintenance-check-precise |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Graham Binns (community) | code | 2011-11-14 | Approve on 2012-01-03 |
|
Review via email:
|
|||
Commit Message
[r=gmb][bug=911175] Make the support-timeframe information that gets added to the 'Packages' file in ubuntu more flexible for the upcomming 12.04 LTS release
Description of the Change
This branch makes the support-timeframe information that gets added to the "Packages" file in ubuntu more flexible for the upcomming 12.04 LTS release.
When 10.04 (lucid) was released we added "Supported: {5y,3y,18m}" tags into the Packages file that is stored on archive.ubuntu.com. This was needed because the individual packages get a different support time based on the "seed" they are in. The server packages are longer supported than the ubuntu-desktop packages etc. The additional information makes it trivial people to check the support status of a particular package and also allows scripts like "ubuntu-
For the upcoming 12.04 the timeframe is changed compared to lucid. The desktop packages are also supported for 5y and there may be architecture changes. The current code in LP is not flexible enough to handle different set of rules for LTS releases, it expected that the rules are all the same. This branch fixes this by adding a UbuntuMaintenance class that can than be used to extend for LTS releases.
Please note that I'm NOT a LP developer, this is a drive-by fix and I did not run ran the testsuite (as outlined in https:/
The QA I have done on this to run:
$ python launchpad/
$ python launchpad/
$ diff -u /tmp/lucid-old-code /tmp/lucid-new-code
(and the same for maverick).
| Michael Vogt (mvo) wrote : | # |
Thanks a bunch for your branch! I merged it back into my branch now.
(1) As for the tests, I know this is pretty bad currently, I will think a bit about it - would you accept regular unittest2 tests? A proper LP test setup on a lucid VM is pretty expensive timewise for me.
(2) If all machines that run this code are on lucid, thats really excellent. I put it there because I wanted to be cautious, but if its not needed I will be more than happy to get rid of it.
| Graham Binns (gmb) wrote : | # |
On 16 November 2011 11:26, Michael Vogt <email address hidden> wrote:
> Thanks a bunch for your branch! I merged it back into my branch now.
>
> (1) As for the tests, I know this is pretty bad currently, I will think a bit about it - would you accept regular unittest2 tests? A proper LP test setup on a lucid VM is pretty expensive timewise for me.
That will certainly work for me. If you write the tests I'll do the
work to integrate them into the LP suite.
> (2) If all machines that run this code are on lucid, thats really excellent. I put it there because I wanted to be cautious, but if its not needed I will be more than happy to get rid of it.
Okay, I'll double-check with the LOSAs on this one and get back to you.
| Graham Binns (gmb) wrote : | # |
On 16 November 2011 11:26, Michael Vogt <email address hidden> wrote:
> (2) If all machines that run this code are on lucid, thats really excellent. I put it there because I wanted to be cautious, but if its not needed I will be more than happy to get rid of it.
I've just checked with the LOSAs; mthaddon confirms that all machines
are running Lucid, so let's drop this and rejoice! :)
| Colin Watson (cjwatson) wrote : | # |
If it helps the QA question, I intend to rewrite maintenance-check in terms of python-germinate at some point in the not too distant future and integrate it into generate-
I hope to be able to do this within about the next two months.
| Colin Watson (cjwatson) wrote : | # |
Oh, and to QA this before any of my future work lands, the simplest way to do this right now is as follows, on mawson:
* Run cronscripts/
* Take a backup of /srv/launchpad.
* Apply Michael's branch.
* Run cronscripts/
* Diff /srv/launchpad.
(You can set the TEST_LAUNCHPADROOT environment variable if at any point you need to run cron.germinate from somewhere other than /srv/launchpad.
This procedure should take well under half an hour. I did it recently for another branch, so I'd be happy to QA this if you want. I'd like to see Michael's branch landed, both because it would be good for appropriate Supported extra overrides to be in place for Precise as soon as possible, and because the longer it remains outstanding the more I'll have to deal with conflicts between this and my work in progress (for instance, I think I'll already have to resolve my new-python-apt branch against this, assuming that this one lands first).
| Graham Binns (gmb) wrote : | # |
Thanks to Colin and Michael for their stirling work. I'll get this landed in the near future.

Hi Michael,
I'm marking this as Needs-Information because of the point about QA below. I'm happy with the code, barring one or two tweaks.
Thanks for this branch. There were a bunch of cosmetic things that
needed cleaning up, but rather than ask you to do it I've pushed up a
branch with those cleanups here:
lp:~gmb/launchpad/maintenance-check-precise. Please merge that before
landing your branch.
I'll run the test suite on the branch for you presently and report any failures.
A couple of other things:
[1]
I'd love to see some tests for this, but it doesn't seem as if there are any in the codebase (aside from a test to see if maintenance- check.py runs as part of cron.germinate). Do you know how we can QA this properly to ensure that it doesn't break things horribly? (It's okay if you don't; I can ask people who will know).
[2]
131 + base.AcquirePro gress base.OpProgress FetchProgress OpProgress
132 +# python-apt compat, the fallback can be removed once the code
133 +# runs on lucid or newer
134 +try:
135 + AcquireProgress = apt.progress.
136 + OpProgress = apt.progress.
137 +except AttributeError:
138 + # really old (hardy) interface
139 + AcquireProgress = apt.progress.
140 + OpProgress = apt.progress.
141 +
Is this really necessary? I thought all our machines ran at least Lucid
now. Or is this necessary until Hardy server gets EoL'd in 2013?