← Back to team overview

launchpad-reviewers team mailing list archive

lp:~julian-edwards/launchpad/cp-bug-653382-domination-series-restriction into lp:~launchpad-pqm/launchpad/production-devel

 

Julian Edwards has proposed merging lp:~julian-edwards/launchpad/cp-bug-653382-domination-series-restriction into lp:~launchpad-pqm/launchpad/production-devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #653382 BinaryPackagePublishingHistory._getOtherPublications fails to restrict the distroseries context
  https://bugs.launchpad.net/bugs/653382


CP the fix from wgrant.  See linked bug.
-- 
https://code.launchpad.net/~julian-edwards/launchpad/cp-bug-653382-domination-series-restriction/+merge/37579
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/launchpad/cp-bug-653382-domination-series-restriction into lp:~launchpad-pqm/launchpad/production-devel.
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2010-09-29 12:33:55 +0000
+++ lib/lp/soyuz/model/publishing.py	2010-10-05 10:04:42 +0000
@@ -1003,7 +1003,7 @@
                 BinaryPackagePublishingHistory,
                 BinaryPackagePublishingHistory.status.is_in(
                     [PUBLISHED, PENDING]),
-                BinaryPackagePublishingHistory.distroarchseries in (
+                BinaryPackagePublishingHistory.distroarchseriesID.is_in(
                     available_architectures),
                 binarypackagerelease=self.binarypackagerelease,
                 archive=self.archive,

=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py	2010-08-30 19:06:34 +0000
+++ lib/lp/soyuz/tests/test_publishing.py	2010-10-05 10:04:42 +0000
@@ -1322,3 +1322,13 @@
         # This will supersede both atomically.
         bins[0].supersede()
         self.checkOtherPublications(bins[0], [])
+
+    def testDoesntFindPublicationsInOtherSeries(self):
+        """Publications in other series shouldn't be found."""
+        bins = self.getPubBinaries(architecturespecific=False)
+        series = self.factory.makeDistroSeries()
+        arch = self.factory.makeDistroArchSeries(distroseries=series)
+        foreign_bins = bins[0].copyTo(
+            series, bins[0].pocket, bins[0].archive)
+        self.checkOtherPublications(bins[0], bins)
+        self.checkOtherPublications(foreign_bins[0], foreign_bins)