Merge lp:~wgrant/launchpad/bug-653382-domination-series-restriction into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 11670
Proposed branch: lp:~wgrant/launchpad/bug-653382-domination-series-restriction
Merge into: lp:launchpad
Diff against target: 30 lines (+11/-1)
2 files modified
lib/lp/soyuz/model/publishing.py (+1/-1)
lib/lp/soyuz/tests/test_publishing.py (+10/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/bug-653382-domination-series-restriction
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+37333@code.launchpad.net

Commit message

Architecture-independent domination again respects the distroseries boundary.

Description of the change

I recently Stormified BinaryPackagePublishingHistory._getOtherPublications, but broke one of the predicates, resulting in publications in other series being inappropriately superseded. See bug #653382 for details.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

I'll land it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2010-09-27 14:35:58 +0000
+++ lib/lp/soyuz/model/publishing.py 2010-10-02 02:29:44 +0000
@@ -1015,7 +1015,7 @@
1015 BinaryPackagePublishingHistory,1015 BinaryPackagePublishingHistory,
1016 BinaryPackagePublishingHistory.status.is_in(1016 BinaryPackagePublishingHistory.status.is_in(
1017 [PUBLISHED, PENDING]),1017 [PUBLISHED, PENDING]),
1018 BinaryPackagePublishingHistory.distroarchseries in (1018 BinaryPackagePublishingHistory.distroarchseriesID.is_in(
1019 available_architectures),1019 available_architectures),
1020 binarypackagerelease=self.binarypackagerelease,1020 binarypackagerelease=self.binarypackagerelease,
1021 archive=self.archive,1021 archive=self.archive,
10221022
=== 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-02 02:29:44 +0000
@@ -1322,3 +1322,13 @@
1322 # This will supersede both atomically.1322 # This will supersede both atomically.
1323 bins[0].supersede()1323 bins[0].supersede()
1324 self.checkOtherPublications(bins[0], [])1324 self.checkOtherPublications(bins[0], [])
1325
1326 def testDoesntFindPublicationsInOtherSeries(self):
1327 """Publications in other series shouldn't be found."""
1328 bins = self.getPubBinaries(architecturespecific=False)
1329 series = self.factory.makeDistroSeries()
1330 arch = self.factory.makeDistroArchSeries(distroseries=series)
1331 foreign_bins = bins[0].copyTo(
1332 series, bins[0].pocket, bins[0].archive)
1333 self.checkOtherPublications(bins[0], bins)
1334 self.checkOtherPublications(foreign_bins[0], foreign_bins)