← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/do-not-reject-ddeb-copies into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/do-not-reject-ddeb-copies into lp:launchpad.

Commit message:
Remove another now-unnecessary ddeb copying check.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/do-not-reject-ddeb-copies/+merge/258368

https://code.launchpad.net/~wgrant/launchpad/do-not-reject-ddebs/+merge/257758 didn't quite catch everything; there's a similar check in the copier as well as in publishBinaries.  Let's remove it too for the same reasons.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/do-not-reject-ddeb-copies into lp:launchpad.
=== modified file 'lib/lp/soyuz/scripts/packagecopier.py'
--- lib/lp/soyuz/scripts/packagecopier.py	2014-08-29 01:15:25 +0000
+++ lib/lp/soyuz/scripts/packagecopier.py	2015-05-06 11:32:31 +0000
@@ -21,10 +21,7 @@
 from lp.services.database.bulk import load_related
 from lp.soyuz.adapters.notification import notify
 from lp.soyuz.adapters.overrides import SourceOverride
-from lp.soyuz.enums import (
-    BinaryPackageFileType,
-    SourcePackageFormat,
-    )
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.interfaces.archive import CannotCopy
 from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
 from lp.soyuz.interfaces.publishing import (
@@ -451,11 +448,6 @@
                 for binary_file in binary_pub.binarypackagerelease.files:
                     if binary_file.libraryfile.expires is not None:
                         raise CannotCopy('source has expired binaries')
-                    if (self.archive.is_main and
-                        not self.archive.build_debug_symbols and
-                        binary_file.filetype == BinaryPackageFileType.DDEB):
-                        raise CannotCopy(
-                            "Cannot copy DDEBs to a primary archive")
 
         # Check if there is already a source with the same name and version
         # published in the destination archive.

=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
--- lib/lp/soyuz/scripts/tests/test_copypackage.py	2014-11-08 23:53:17 +0000
+++ lib/lp/soyuz/scripts/tests/test_copypackage.py	2015-05-06 11:32:31 +0000
@@ -670,16 +670,18 @@
             "explicit unembargo option.")
         self.assertCanCopyBinaries(unembargo=True)
 
-    def test_cannot_copy_ddebs_to_primary_archives(self):
-        # The primary archive cannot (yet) cope with DDEBs, see bug
-        # 724237 and anything tagged "ddebs".
+    def test_can_copy_ddebs_to_primary_archives(self):
+        # Copying DDEBs to a primary archive is allowed even if it has
+        # build_debug_symbols disabled.
         ppa = self.factory.makeArchive(purpose=ArchivePurpose.PPA)
         self.archive = self.test_publisher.ubuntutest.main_archive
+        self.assertFalse(self.archive.build_debug_symbols)
         self.series = self.test_publisher.breezy_autotest
-        self.source = self.test_publisher.getPubSource(archive=ppa)
+        self.source = self.test_publisher.getPubSource(
+            sourcename="with-ddebs", archive=ppa)
         self.test_publisher.getPubBinaries(
             pub_source=self.source, with_debug=True)
-        self.assertCannotCopyBinaries('Cannot copy DDEBs to a primary archive')
+        self.assertCanCopyBinaries()
 
     def test_cannot_copy_source_twice(self):
         # checkCopy refuses to copy the same source twice.  Duplicates are


Follow ups