← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/shift-obsolete-check into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/shift-obsolete-check into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/shift-obsolete-check/+merge/166425

Shift the obsolete distroseries check forward, we want it to trigger for all archives, not only PRIMARY.
-- 
https://code.launchpad.net/~stevenk/launchpad/shift-obsolete-check/+merge/166425
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/shift-obsolete-check into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py	2013-05-29 09:05:54 +0000
+++ lib/lp/soyuz/model/archive.py	2013-05-30 02:39:32 +0000
@@ -1283,13 +1283,6 @@
         if not self.enabled:
             return ArchiveDisabled(self.displayname)
 
-        # For PPAs...
-        if self.is_ppa:
-            if not self.checkArchivePermission(person):
-                return CannotUploadToPPA()
-            else:
-                return None
-
         # If the target series is OBSOLETE and permit_obsolete_series_uploads
         # is not set, reject.
         if (
@@ -1297,6 +1290,13 @@
             not self.permit_obsolete_series_uploads):
             return CannotUploadToSeries(distroseries)
 
+        # For PPAs...
+        if self.is_ppa:
+            if not self.checkArchivePermission(person):
+                return CannotUploadToPPA()
+            else:
+                return None
+
         # Users with pocket upload permissions may upload to anything in the
         # given pocket.
         if pocket is not None and self.checkArchivePermission(person, pocket):