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
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2012-09-07 05:43:28 +0000
+++ lib/lp/soyuz/model/archive.py 2012-09-13 05:22:19 +0000
@@ -1267,6 +1267,7 @@
1267 pre_release_pockets = (1267 pre_release_pockets = (
1268 PackagePublishingPocket.RELEASE,1268 PackagePublishingPocket.RELEASE,
1269 PackagePublishingPocket.PROPOSED,1269 PackagePublishingPocket.PROPOSED,
1270 PackagePublishingPocket.BACKPORTS,
1270 )1271 )
1271 if (pocket not in pre_release_pockets and1272 if (pocket not in pre_release_pockets and
1272 distroseries.status not in stable_states):1273 distroseries.status not in stable_states):
12731274
=== modified file 'lib/lp/soyuz/tests/test_archive.py'
--- lib/lp/soyuz/tests/test_archive.py 2012-08-21 14:15:43 +0000
+++ lib/lp/soyuz/tests/test_archive.py 2012-09-13 05:22:19 +0000
@@ -621,6 +621,20 @@
621 pocket=PackagePublishingPocket.PROPOSED,621 pocket=PackagePublishingPocket.PROPOSED,
622 distroseries=distroseries)622 distroseries=distroseries)
623623
624 def test_checkUpload_backports_development(self):
625 # It should be possible to upload to the BACKPORTS pocket while the
626 # distroseries is in the DEVELOPMENT status.
627 archive, distroseries = self.makeArchiveAndActiveDistroSeries(
628 purpose=ArchivePurpose.PRIMARY)
629 sourcepackagename = self.factory.makeSourcePackageName()
630 person = self.factory.makePerson()
631 removeSecurityProxy(archive).newPackageUploader(
632 person, sourcepackagename)
633 self.assertCanUpload(
634 archive, person, sourcepackagename,
635 pocket=PackagePublishingPocket.BACKPORTS,
636 distroseries=distroseries)
637
624 def test_checkUpload_disabled_archive(self):638 def test_checkUpload_disabled_archive(self):
625 archive, distroseries = self.makeArchiveAndActiveDistroSeries(639 archive, distroseries = self.makeArchiveAndActiveDistroSeries(
626 purpose=ArchivePurpose.PRIMARY)640 purpose=ArchivePurpose.PRIMARY)