← Back to team overview

launchpad-reviewers team mailing list archive

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

 

William Grant has proposed merging lp:~wgrant/launchpad/do-not-reject-ddebs into lp:launchpad.

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/do-not-reject-ddebs/+merge/257758

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.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/do-not-reject-ddebs into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2015-04-08 10:35:22 +0000
+++ lib/lp/soyuz/model/publishing.py	2015-04-29 14:06:02 +0000
@@ -1125,15 +1125,6 @@
             # an unsupported architecture.
             return []
 
-        if (archive.purpose == ArchivePurpose.PRIMARY
-            and not archive.build_debug_symbols
-            and any(
-                1 for _, bpr, _ in expanded
-                if bpr.binpackageformat == BinaryPackageFormat.DDEB)):
-            raise QueueInconsistentStateError(
-                "Won't publish ddebs to a primary archive that doesn't want "
-                "them.")
-
         # Find existing publications.
         # We should really be able to just compare BPR.id, but
         # CopyChecker doesn't seem to ensure that there are no

=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py	2015-04-20 09:48:57 +0000
+++ lib/lp/soyuz/tests/test_publishing.py	2015-04-29 14:06:02 +0000
@@ -1493,22 +1493,6 @@
         args['pocket'] = PackagePublishingPocket.RELEASE
         [another_bpph] = getUtility(IPublishingSet).publishBinaries(**args)
 
-    def test_primary_ddebs_need_ddebs_enabled(self):
-        debug = self.factory.makeBinaryPackageRelease(
-            binpackageformat=BinaryPackageFormat.DDEB)
-        args = self.makeArgs(
-            [debug], debug.build.distro_arch_series.distroseries)
-
-        # ddebs are rejected with build_debug_symbols unset
-        self.assertRaises(
-            QueueInconsistentStateError,
-            getUtility(IPublishingSet).publishBinaries, **args)
-
-        # But accepted with build_debug_symbols set
-        archive = debug.build.distro_arch_series.distroseries.main_archive
-        archive.build_debug_symbols = True
-        getUtility(IPublishingSet).publishBinaries(**args)
-
 
 class TestChangeOverride(TestNativePublishingBase):
     """Test that changing overrides works."""


Follow ups