Merge lp:~wgrant/launchpad/do-not-reject-ddebs into lp:launchpad

Proposed by William Grant
Status: Merged
Merged at revision: 17466
Proposed branch: lp:~wgrant/launchpad/do-not-reject-ddebs
Merge into: lp:launchpad
Diff against target: 46 lines (+0/-25)
2 files modified
lib/lp/soyuz/model/publishing.py (+0/-9)
lib/lp/soyuz/tests/test_publishing.py (+0/-16)
To merge this branch: bzr merge lp:~wgrant/launchpad/do-not-reject-ddebs
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+257758@code.launchpad.net

Commit message

Drop the primary archive ddeb copy restriction, since the publish_debug_symbols flag prevents disaster.

Description of the change

While implementing ddebs, I added a check to the copier to prevent ddebs from being accidentally published to the primary archive. In a later stage of the implementation I introduced the publish_debug_symbols flag, which prevents ddebs from leaking out into the archive, so we don't need the check any more.

Let's remove it so a future emergency ddeb disablement doesn't descend into disaster again.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

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 2015-04-08 10:35:22 +0000
3+++ lib/lp/soyuz/model/publishing.py 2015-04-29 14:06:02 +0000
4@@ -1125,15 +1125,6 @@
5 # an unsupported architecture.
6 return []
7
8- if (archive.purpose == ArchivePurpose.PRIMARY
9- and not archive.build_debug_symbols
10- and any(
11- 1 for _, bpr, _ in expanded
12- if bpr.binpackageformat == BinaryPackageFormat.DDEB)):
13- raise QueueInconsistentStateError(
14- "Won't publish ddebs to a primary archive that doesn't want "
15- "them.")
16-
17 # Find existing publications.
18 # We should really be able to just compare BPR.id, but
19 # CopyChecker doesn't seem to ensure that there are no
20
21=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
22--- lib/lp/soyuz/tests/test_publishing.py 2015-04-20 09:48:57 +0000
23+++ lib/lp/soyuz/tests/test_publishing.py 2015-04-29 14:06:02 +0000
24@@ -1493,22 +1493,6 @@
25 args['pocket'] = PackagePublishingPocket.RELEASE
26 [another_bpph] = getUtility(IPublishingSet).publishBinaries(**args)
27
28- def test_primary_ddebs_need_ddebs_enabled(self):
29- debug = self.factory.makeBinaryPackageRelease(
30- binpackageformat=BinaryPackageFormat.DDEB)
31- args = self.makeArgs(
32- [debug], debug.build.distro_arch_series.distroseries)
33-
34- # ddebs are rejected with build_debug_symbols unset
35- self.assertRaises(
36- QueueInconsistentStateError,
37- getUtility(IPublishingSet).publishBinaries, **args)
38-
39- # But accepted with build_debug_symbols set
40- archive = debug.build.distro_arch_series.distroseries.main_archive
41- archive.build_debug_symbols = True
42- getUtility(IPublishingSet).publishBinaries(**args)
43-
44
45 class TestChangeOverride(TestNativePublishingBase):
46 """Test that changing overrides works."""