Merge lp:~ajmitch/launchpad/prerelease-backports into lp:launchpad

Proposed by Andrew Mitchell
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 15967
Proposed branch: lp:~ajmitch/launchpad/prerelease-backports
Merge into: lp:launchpad
Diff against target: 36 lines (+15/-0)
2 files modified
lib/lp/soyuz/model/archive.py (+1/-0)
lib/lp/soyuz/tests/test_archive.py (+14/-0)
To merge this branch: bzr merge lp:~ajmitch/launchpad/prerelease-backports
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Steve Kowalik (community) code Approve
Review via email: mp+124100@code.launchpad.net

Commit message

Also allow uploads to the backports pocket when the series status is not CURRENT or SUPPORTED

Description of the change

Also allow uploads to the backports pocket when the series status is not CURRENT or SUPPORTED

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) wrote :

This looks like great work, thanks! I'm going to approve this, but you should discuss this with Colin Watson before asking for it to be landed.

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

This is fine by me - it's been discussed before and as far as I remember TB-approved.

Sorry for misleading you earlier on IRC about the need for uploadpolicy tests; I didn't realise that you wanted backports to be unapproved by default. I admit that's slightly surprising to me, but it's a reasonable decision.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/model/archive.py'
2--- lib/lp/soyuz/model/archive.py 2012-09-07 05:43:28 +0000
3+++ lib/lp/soyuz/model/archive.py 2012-09-13 05:22:19 +0000
4@@ -1267,6 +1267,7 @@
5 pre_release_pockets = (
6 PackagePublishingPocket.RELEASE,
7 PackagePublishingPocket.PROPOSED,
8+ PackagePublishingPocket.BACKPORTS,
9 )
10 if (pocket not in pre_release_pockets and
11 distroseries.status not in stable_states):
12
13=== modified file 'lib/lp/soyuz/tests/test_archive.py'
14--- lib/lp/soyuz/tests/test_archive.py 2012-08-21 14:15:43 +0000
15+++ lib/lp/soyuz/tests/test_archive.py 2012-09-13 05:22:19 +0000
16@@ -621,6 +621,20 @@
17 pocket=PackagePublishingPocket.PROPOSED,
18 distroseries=distroseries)
19
20+ def test_checkUpload_backports_development(self):
21+ # It should be possible to upload to the BACKPORTS pocket while the
22+ # distroseries is in the DEVELOPMENT status.
23+ archive, distroseries = self.makeArchiveAndActiveDistroSeries(
24+ purpose=ArchivePurpose.PRIMARY)
25+ sourcepackagename = self.factory.makeSourcePackageName()
26+ person = self.factory.makePerson()
27+ removeSecurityProxy(archive).newPackageUploader(
28+ person, sourcepackagename)
29+ self.assertCanUpload(
30+ archive, person, sourcepackagename,
31+ pocket=PackagePublishingPocket.BACKPORTS,
32+ distroseries=distroseries)
33+
34 def test_checkUpload_disabled_archive(self):
35 archive, distroseries = self.makeArchiveAndActiveDistroSeries(
36 purpose=ArchivePurpose.PRIMARY)