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
1=== modified file 'lib/lp/soyuz/model/publishing.py'
2--- lib/lp/soyuz/model/publishing.py 2010-09-27 14:35:58 +0000
3+++ lib/lp/soyuz/model/publishing.py 2010-10-02 02:29:44 +0000
4@@ -1015,7 +1015,7 @@
5 BinaryPackagePublishingHistory,
6 BinaryPackagePublishingHistory.status.is_in(
7 [PUBLISHED, PENDING]),
8- BinaryPackagePublishingHistory.distroarchseries in (
9+ BinaryPackagePublishingHistory.distroarchseriesID.is_in(
10 available_architectures),
11 binarypackagerelease=self.binarypackagerelease,
12 archive=self.archive,
13
14=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
15--- lib/lp/soyuz/tests/test_publishing.py 2010-08-30 19:06:34 +0000
16+++ lib/lp/soyuz/tests/test_publishing.py 2010-10-02 02:29:44 +0000
17@@ -1322,3 +1322,13 @@
18 # This will supersede both atomically.
19 bins[0].supersede()
20 self.checkOtherPublications(bins[0], [])
21+
22+ def testDoesntFindPublicationsInOtherSeries(self):
23+ """Publications in other series shouldn't be found."""
24+ bins = self.getPubBinaries(architecturespecific=False)
25+ series = self.factory.makeDistroSeries()
26+ arch = self.factory.makeDistroArchSeries(distroseries=series)
27+ foreign_bins = bins[0].copyTo(
28+ series, bins[0].pocket, bins[0].archive)
29+ self.checkOtherPublications(bins[0], bins)
30+ self.checkOtherPublications(foreign_bins[0], foreign_bins)