← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/no-archivepurpose-debug into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/no-archivepurpose-debug into lp:launchpad with lp:~wgrant/launchpad/no-debug_archive as a prerequisite.

Commit message:
Kill off ArchivePurpose.DEBUG. ddebs go into the primary archive now.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/no-archivepurpose-debug/+merge/161930

RIP ARCHIVEPURPOSE.DEBUG
-- 
https://code.launchpad.net/~wgrant/launchpad/no-archivepurpose-debug/+merge/161930
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/no-archivepurpose-debug into lp:launchpad.
=== modified file 'database/sampledata/current-dev.sql'
--- database/sampledata/current-dev.sql	2013-05-01 19:28:34 +0000
+++ database/sampledata/current-dev.sql	2013-05-01 19:28:34 +0000
@@ -2348,7 +2348,6 @@
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (12, 17, 'Partner archive', true, NULL, 1, 4, false, NULL, NULL, NULL, NULL, NULL, false, 'partner', true, '2008-05-27 18:15:15.869209', 1, 0, 1, 0, 0, '2008-09-23 17:29:03.449157', NULL, NULL, NULL, 'Partner Archive for Ubuntu Linux', 0, NULL, 0, false, false);
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (13, 17, 'Partner archive', true, NULL, 8, 4, false, NULL, NULL, NULL, NULL, NULL, false, 'partner', true, '2008-05-27 18:15:15.869732', 0, 0, 0, 0, 0, '2008-09-23 17:29:03.449471', NULL, NULL, NULL, 'Partner Archive for Ubuntu Test', 0, NULL, 0, false, false);
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (14, 17, 'Sample copy archive', true, NULL, 8, 6, false, NULL, NULL, NULL, NULL, NULL, false, 'samplecopyarchive', false, '2008-11-19 18:15:15.869732', 0, 0, 0, 0, 0, '2008-11-18 17:29:03.449471', NULL, NULL, NULL, 'Copy archive samplecopyarchive for Ubuntu Team', 0, NULL, 0, false, false);
-INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (15, 17, 'Debug archive', true, NULL, 1, 7, false, NULL, NULL, NULL, NULL, NULL, false, 'debug', true, '2009-04-17 10:09:10.859746', 0, 0, 0, 0, 0, '2009-04-17 10:01:03.449876', NULL, NULL, NULL, 'Ubuntu DEBUG archive', 0, NULL, 0, false, false);
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (16, 16, NULL, true, 2048, 9, 1, false, 0, 0, NULL, NULL, NULL, true, 'primary', true, '2011-03-17 14:28:54.354337', 0, 0, 0, 0, 0, '2011-03-17 14:28:54.354337', NULL, NULL, NULL, 'Primary Archive for Deribuntu', 0, NULL, 0, false, false);
 
 

=== modified file 'database/sampledata/current.sql'
--- database/sampledata/current.sql	2013-05-01 19:28:34 +0000
+++ database/sampledata/current.sql	2013-05-01 19:28:34 +0000
@@ -2344,7 +2344,6 @@
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (12, 17, 'Partner archive', true, NULL, 1, 4, false, NULL, NULL, NULL, NULL, NULL, false, 'partner', true, '2008-05-27 18:15:15.869209', 1, 0, 1, 0, 0, '2008-09-23 17:29:03.449157', NULL, NULL, NULL, 'Partner Archive for Ubuntu Linux', 0, NULL, 0, false, false);
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (13, 17, 'Partner archive', true, NULL, 8, 4, false, NULL, NULL, NULL, NULL, NULL, false, 'partner', true, '2008-05-27 18:15:15.869732', 0, 0, 0, 0, 0, '2008-09-23 17:29:03.449471', NULL, NULL, NULL, 'Partner Archive for Ubuntu Test', 0, NULL, 0, false, false);
 INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (14, 17, 'Sample copy archive', true, NULL, 8, 6, false, NULL, NULL, NULL, NULL, NULL, false, 'samplecopyarchive', false, '2008-11-19 18:15:15.869732', 0, 0, 0, 0, 0, '2008-11-18 17:29:03.449471', NULL, NULL, NULL, 'Copy archive samplecopyarchive for Ubuntu Team', 0, NULL, 0, false, false);
-INSERT INTO archive (id, owner, description, enabled, authorized_size, distribution, purpose, private, sources_cached, binaries_cached, package_description_cache, fti, buildd_secret, require_virtualized, name, publish, date_updated, total_count, pending_count, succeeded_count, failed_count, building_count, date_created, signing_key, removed_binary_retention_days, num_old_versions_published, displayname, relative_build_score, external_dependencies, status, suppress_subscription_notifications, build_debug_symbols) VALUES (15, 17, 'Debug archive', true, NULL, 1, 7, false, NULL, NULL, NULL, NULL, NULL, false, 'debug', true, '2009-04-17 10:09:10.859746', 0, 0, 0, 0, 0, '2009-04-17 10:01:03.449876', NULL, NULL, NULL, 'Ubuntu DEBUG archive', 0, NULL, 0, false, false);
 
 
 ALTER TABLE archive ENABLE TRIGGER ALL;

=== modified file 'lib/lp/app/browser/tales.py'
--- lib/lp/app/browser/tales.py	2013-04-17 16:46:37 +0000
+++ lib/lp/app/browser/tales.py	2013-05-01 19:28:34 +0000
@@ -1153,7 +1153,6 @@
             ArchivePurpose.PARTNER: '/@@/distribution',
             ArchivePurpose.PPA: '/@@/ppa-icon',
             ArchivePurpose.COPY: '/@@/distribution',
-            ArchivePurpose.DEBUG: '/@@/distribution',
             }
 
         alt = '[%s]' % self._context.purpose.title

=== modified file 'lib/lp/app/doc/tales.txt'
--- lib/lp/app/doc/tales.txt	2013-04-17 11:07:33 +0000
+++ lib/lp/app/doc/tales.txt	2013-05-01 19:28:34 +0000
@@ -95,12 +95,12 @@
     >>> print test_tales("ppa/image:icon", ppa=mark.archive)
     <img ... src="/@@/ppa-icon" />
 
-Then distribution main archives (primary, partner and debug).
+Then distribution main archives (primary and partner).
 
     >>> from lp.registry.interfaces.distribution import (
     ...      IDistributionSet)
     >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
-    >>> [primary, partner, debug] = ubuntu.all_distro_archives
+    >>> [primary, partner] = ubuntu.all_distro_archives
 
     >>> print test_tales("archive/image:icon", archive=primary)
     <img ... src="/@@/distribution" />
@@ -108,9 +108,6 @@
     >>> print test_tales("archive/image:icon", archive=partner)
     <img ... src="/@@/distribution" />
 
-    >>> print test_tales("archive/image:icon", archive=debug)
-    <img ... src="/@@/distribution" />
-
 And finally Copy archives.
 
     >>> from lp.soyuz.enums import ArchivePurpose
@@ -180,10 +177,10 @@
     >>> print test_tales("ppa/fmt:reference", ppa=private_ppa)
     ppa:joe/pppa
 
-The same 'link' formatter works for distribution archives, with a different
-sprite.  The link target for main archives (primary, partner, and debug) is
-the distribution rather than the archive, as the archives would just
-redirect anyway.
+The same 'link' formatter works for distribution archives, with a
+different sprite.  The link target for main archives (primary and
+partner) is the distribution rather than the archive, as the archives
+would just redirect anyway.
 
     >>> print test_tales("archive/fmt:link", archive=primary)
     <a href="/ubuntu" class="sprite distribution">Primary Archive for Ubuntu
@@ -193,9 +190,6 @@
     <a href="/ubuntu" class="sprite distribution">Partner Archive for Ubuntu
     Linux</a>
 
-    >>> print test_tales("archive/fmt:link", archive=debug)
-    <a href="/ubuntu" class="sprite distribution">Ubuntu DEBUG archive</a>
-
     >>> print test_tales("archive/fmt:link", archive=copy)
     <a href="/ubuntu/+archive/rebuild" class="sprite distribution">Copy
     archive rebuild for Mark Shuttleworth</a>

=== modified file 'lib/lp/archivepublisher/tests/test_config.py'
--- lib/lp/archivepublisher/tests/test_config.py	2012-09-20 12:00:22 +0000
+++ lib/lp/archivepublisher/tests/test_config.py	2013-05-01 19:28:34 +0000
@@ -72,26 +72,6 @@
             self.root + "/ubuntutest-temp", partner_config.temproot)
         self.assertEqual(archiveroot + "-uefi", partner_config.uefiroot)
 
-    def test_debug_config(self):
-        # The publisher configuration for DEBUG archives points to
-        # directories beside PRIMARY repository ones, but the distribution
-        # part is modified to be clearly different than the PRIMARY one.
-        debug_archive = getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=self.ubuntutest.owner,
-            distribution=self.ubuntutest)
-        debug_config = getPubConfig(debug_archive)
-        self.assertEqual(self.root, debug_config.distroroot)
-        archiveroot = self.root + "/ubuntutest-debug"
-        self.assertEqual(archiveroot, debug_config.archiveroot)
-        self.assertEqual(archiveroot + "/pool", debug_config.poolroot)
-        self.assertEqual(archiveroot + "/dists", debug_config.distsroot)
-        self.assertIsNone(debug_config.overrideroot)
-        self.assertIsNone(debug_config.cacheroot)
-        self.assertIsNone(debug_config.miscroot)
-        self.assertIsNone(debug_config.germinateroot)
-        self.assertEqual(self.root + "/ubuntutest-temp", debug_config.temproot)
-        self.assertEqual(archiveroot + "-uefi", debug_config.uefiroot)
-
     def test_copy_config(self):
         # In the case of copy archives (used for rebuild testing) the
         # archiveroot is of the form

=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt	2013-01-24 05:50:23 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt	2013-05-01 19:28:34 +0000
@@ -419,7 +419,7 @@
 
     # Populate the ubuntutest PARTNER archive with one built and one
     # pending build source.
-    >>> primary, partner, debug = ubuntu.all_distro_archives
+    >>> primary, partner = ubuntu.all_distro_archives
     >>> unused_source = test_publisher.getPubSource(
     ...     archive=partner, component='partner')
     >>> unused = test_publisher.getPubBinaries(

=== modified file 'lib/lp/soyuz/doc/archive.txt'
--- lib/lp/soyuz/doc/archive.txt	2013-03-18 00:57:56 +0000
+++ lib/lp/soyuz/doc/archive.txt	2013-05-01 19:28:34 +0000
@@ -139,9 +139,9 @@
 
 
 'name' is only editable by an LP administrator and only exposed via the
-ArchiveRebuild user interface. PRIMARY, PARTNER and DEBUG archives
-cannot be renamed, and PPA named can only be changed once the PPA has
-been deleted.
+ArchiveRebuild user interface. PRIMARY and PARTNER archives cannot be
+renamed, and PPA named can only be changed once the PPA has been
+deleted.
 
     >>> login("celso.providelo@xxxxxxxxxxxxx")
 
@@ -1060,10 +1060,6 @@
     ...     ubuntutest, ArchivePurpose.PRIMARY).archive_url
     http://archive.launchpad.dev/ubuntutest
 
-    >>> print getUtility(IArchiveSet).getByDistroPurpose(
-    ...     ubuntu, ArchivePurpose.DEBUG).archive_url
-    http://archive.launchpad.dev/ubuntu-debug
-
 COPY archives use a URL format of <distro-name>-<archive-name>:
 
     >>> print naked_copy_target.archive.is_copy
@@ -1109,17 +1105,17 @@
     True
 
 Iteration over the own utility is performed against all archives,
-including PPA, DEBUG, PRIMARY, PARTNER and COPY:
+including PPA, PRIMARY, PARTNER and COPY:
 
     >>> from lp.testing import celebrity_logged_in
     >>> with celebrity_logged_in('admin'):
     ...     archive_purposes = [
     ...         archive.purpose.name for archive in archive_set]
     >>> len(archive_purposes)
-    18
+    17
 
     >>> print sorted(set(archive_purposes))
-    ['COPY', 'DEBUG', 'PARTNER', 'PPA', 'PRIMARY']
+    ['COPY', 'PARTNER', 'PPA', 'PRIMARY']
 
 'getPPAsForUser' returns all the PPAs a given user participates in. It
 uses `TeamParticipation` relationships to calculate all the PPAs the

=== modified file 'lib/lp/soyuz/doc/packageupload-lookups.txt'
--- lib/lp/soyuz/doc/packageupload-lookups.txt	2010-08-30 02:07:38 +0000
+++ lib/lp/soyuz/doc/packageupload-lookups.txt	2013-05-01 19:28:34 +0000
@@ -67,8 +67,6 @@
     17 of 20 sources and 6 of 8 builds missing uploads
     * Partner Archive for Ubuntu Linux
     0 of 1 sources and 1 of 1 builds missing uploads
-    * Ubuntu DEBUG archive
-    0 of 0 sources and 0 of 0 builds missing uploads
 
     >>> for ppa in ubuntu.getAllPPAs():
     ...     check_upload_lookups(ppa)

=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2012-10-24 09:47:43 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2013-05-01 19:28:34 +0000
@@ -79,7 +79,6 @@
     >>> from lp.soyuz.scripts.initialize_distroseries import (
     ...     InitializeDistroSeries)
     >>> from lp.services.librarian.model import LibraryFileAlias
-    >>> from lp.soyuz.enums import ArchivePurpose
     >>> from lp.testing.factory import LaunchpadObjectFactory
     >>> ubuntu = Distribution.byName('ubuntu')
     >>> breezy_autotest = ubuntu['breezy-autotest']
@@ -89,8 +88,6 @@
     ...     'Black and White', 'Someone', '5.10', None,
     ...     breezy_autotest.owner)
     >>> factory = LaunchpadObjectFactory()
-    >>> debug_archive = factory.makeArchive(
-    ...     distribution=breezy.distribution, purpose=ArchivePurpose.DEBUG)
     >>> breezy.previous_series = breezy_autotest
     >>> ids = InitializeDistroSeries(breezy, [breezy_autotest.id])
     >>> ids.initialize()

=== modified file 'lib/lp/soyuz/enums.py'
--- lib/lp/soyuz/enums.py	2012-06-25 15:34:52 +0000
+++ lib/lp/soyuz/enums.py	2013-05-01 19:28:34 +0000
@@ -106,7 +106,6 @@
 archive_suffixes = {
     ArchivePurpose.PRIMARY: '',
     ArchivePurpose.PARTNER: '-partner',
-    ArchivePurpose.DEBUG: '-debug',
 }
 
 

=== modified file 'lib/lp/soyuz/interfaces/archive.py'
--- lib/lp/soyuz/interfaces/archive.py	2013-05-01 19:28:34 +0000
+++ lib/lp/soyuz/interfaces/archive.py	2013-05-01 19:28:34 +0000
@@ -2107,14 +2107,12 @@
     ArchivePurpose.PRIMARY: 'primary',
     ArchivePurpose.PPA: 'ppa',
     ArchivePurpose.PARTNER: 'partner',
-    ArchivePurpose.DEBUG: 'debug',
     }
 
 
 MAIN_ARCHIVE_PURPOSES = (
     ArchivePurpose.PRIMARY,
     ArchivePurpose.PARTNER,
-    ArchivePurpose.DEBUG,
     )
 
 ALLOW_RELEASE_BUILDS = (
@@ -2125,7 +2123,6 @@
 
 FULL_COMPONENT_SUPPORT = (
     ArchivePurpose.PRIMARY,
-    ArchivePurpose.DEBUG,
     ArchivePurpose.COPY,
     )
 

=== modified file 'lib/lp/soyuz/scripts/initialize_distroseries.py'
--- lib/lp/soyuz/scripts/initialize_distroseries.py	2012-10-18 13:53:16 +0000
+++ lib/lp/soyuz/scripts/initialize_distroseries.py	2013-05-01 19:28:34 +0000
@@ -499,7 +499,7 @@
         We copy all PENDING and PUBLISHED records as PENDING into our own
         publishing records.
 
-        We copy only the RELEASE pocket in the PRIMARY and DEBUG archives.
+        We copy only the RELEASE pocket in the PRIMARY archive.
         """
         archive_set = getUtility(IArchiveSet)
 
@@ -516,8 +516,7 @@
 
             distroarchseries_list = distroarchseries_lists[parent]
             for archive in parent.distribution.all_distro_archives:
-                if archive.purpose not in (
-                    ArchivePurpose.PRIMARY, ArchivePurpose.DEBUG):
+                if archive.purpose != ArchivePurpose.PRIMARY:
                     continue
 
                 target_archive = archive_set.getByDistroPurpose(

=== modified file 'lib/lp/soyuz/scripts/publishdistro.py'
--- lib/lp/soyuz/scripts/publishdistro.py	2013-02-25 04:13:16 +0000
+++ lib/lp/soyuz/scripts/publishdistro.py	2013-05-01 19:28:34 +0000
@@ -101,11 +101,6 @@
             "--copy-archive", action="store_true", dest="copy_archive",
             default=False, help="Only run over the copy archives.")
 
-        self.parser.add_option(
-            "--primary-debug", action="store_true", default=False,
-            dest="primary_debug",
-            help="Only run over the debug-symbols for primary archive.")
-
     def isCareful(self, option):
         """Is the given "carefulness" option enabled?
 
@@ -146,7 +141,6 @@
             self.options.partner,
             self.options.ppa,
             self.options.private_ppa,
-            self.options.primary_debug,
             self.options.copy_archive,
             ]
         return len(filter(None, exclusive_options))
@@ -174,7 +168,7 @@
         if self.countExclusiveOptions() > 1:
             raise OptionValueError(
                 "Can only specify one of partner, ppa, private-ppa, "
-                "copy-archive and primary-debug.")
+                "copy-archive.")
 
         if self.options.all_derived and self.options.distribution is not None:
                 raise OptionValueError(
@@ -230,15 +224,6 @@
             self.findSuite(distribution, suite)
             for suite in self.options.suite])
 
-    def getDebugArchive(self, distribution):
-        """Find the debug archive for the selected distribution, as a list."""
-        debug_archive = getUtility(IArchiveSet).getByDistroPurpose(
-            distribution, ArchivePurpose.DEBUG)
-        if debug_archive is None:
-            raise OptionValueError(
-                "Could not find DEBUG archive for %s" % distribution.name)
-        return [debug_archive]
-
     def getCopyArchives(self, distribution):
         """Find copy archives for the selected distribution."""
         copy_archives = list(
@@ -263,8 +248,6 @@
             return filter(is_ppa_public, self.getPPAs(distribution))
         elif self.options.private_ppa:
             return filter(is_ppa_private, self.getPPAs(distribution))
-        elif self.options.primary_debug:
-            return self.getDebugArchive(distribution)
         elif self.options.copy_archive:
             return self.getCopyArchives(distribution)
         else:

=== modified file 'lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py'
--- lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py	2013-02-14 01:10:48 +0000
+++ lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py	2013-05-01 19:28:34 +0000
@@ -1197,16 +1197,16 @@
             ids.check)
 
     def createDistroSeriesWithPublication(self, distribution=None):
-        # Create a distroseries with a publication in the DEBUG archive.
+        # Create a distroseries with a publication in the PARTNER archive.
         distroseries = self.factory.makeDistroSeries(
             distribution=distribution)
         # Publish a package in another archive in distroseries' distribution.
-        debug_archive = self.factory.makeArchive(
+        partner_archive = self.factory.makeArchive(
             distribution=distroseries.distribution,
-            purpose=ArchivePurpose.DEBUG)
+            purpose=ArchivePurpose.PARTNER)
 
         self.factory.makeSourcePackagePublishingHistory(
-            distroseries=distroseries, archive=debug_archive)
+            distroseries=distroseries, archive=partner_archive)
         return distroseries
 
     def test_copy_method_diff_archive_empty_target(self):

=== modified file 'lib/lp/soyuz/scripts/tests/test_publishdistro.py'
--- lib/lp/soyuz/scripts/tests/test_publishdistro.py	2013-02-25 07:31:34 +0000
+++ lib/lp/soyuz/scripts/tests/test_publishdistro.py	2013-05-01 19:28:34 +0000
@@ -275,51 +275,6 @@
         pub_source.sync()
         self.assertEqual(pub_source.status, PackagePublishingStatus.PUBLISHED)
 
-    def testPublishPrimaryDebug(self):
-        # 'ubuntutest' (default testing distribution) has no DEBUG
-        # archive, Thus an error is raised.
-        self.assertRaises(
-            OptionValueError,
-            self.runPublishDistro, ['--primary-debug'])
-
-        # The DEBUG repository path was not created.
-        ubuntutest = getUtility(IDistributionSet)['ubuntutest']
-        root_dir = getUtility(
-            IPublisherConfigSet).getByDistribution(ubuntutest).root_dir
-        repo_path = os.path.join(
-            root_dir, 'ubuntutest-debug')
-        self.assertNotExists(repo_path)
-
-        # We will create the DEBUG archive for ubuntutest, so it can
-        # be published.
-        debug_archive = getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=ubuntutest.owner,
-            distribution=ubuntutest)
-
-        # We will also create a source & binary pair of pending
-        # publications. Only the DDEB (binary) will be moved to
-        # the DEBUG archive, exactly as it would happen in normal
-        # operation, see nascentupload-ddebs.txt.
-        self.prepareBreezyAutotest()
-        pub_binaries = self.getPubBinaries(format=BinaryPackageFormat.DDEB)
-        for binary in pub_binaries:
-            binary.archive = debug_archive
-
-        # Commit setup changes, so the script can operate on them.
-        self.layer.txn.commit()
-
-        # After publication, the DDEB is published and indexed.
-        self.runPublishDistro(['--primary-debug'])
-
-        debug_pool_path = os.path.join(repo_path, 'pool/main/f/foo')
-        self.assertEqual(
-            os.listdir(debug_pool_path), ['foo-bin_666_all.ddeb'])
-
-        debug_index_path = os.path.join(
-            repo_path, 'dists/breezy-autotest/main/binary-i386/Packages')
-        self.assertEqual(
-            open(debug_index_path).readlines()[0], 'Package: foo-bin\n')
-
     def testPublishCopyArchive(self):
         """Run publish-distro in copy archive mode.
 
@@ -501,12 +456,6 @@
             1,
             self.makeScript(args=['--private-ppa']).countExclusiveOptions())
 
-    def test_countExclusiveOptions_counts_primary_debug(self):
-        # countExclusiveOptions includes the "primary-debug" option.
-        self.assertEqual(
-            1,
-            self.makeScript(args=['--primary-debug']).countExclusiveOptions())
-
     def test_countExclusiveOptions_counts_copy_archive(self):
         # countExclusiveOptions includes the "copy-archive" option.
         self.assertEqual(
@@ -661,38 +610,6 @@
         self.assertContentEqual(
             expected_suites, script.findAllowedSuites(series.distribution))
 
-    def test_getDebugArchive_returns_list(self):
-        # getDebugArchive returns a list of one archive.  Fits in more
-        # regularly with the other methods to find archives.
-        distro = self.makeDistro()
-        script = self.makeScript(distro)
-        debug_archive = self.factory.makeArchive(
-            distro, purpose=ArchivePurpose.DEBUG)
-        self.assertEqual([debug_archive], script.getDebugArchive(distro))
-
-    def test_getDebugArchive_raises_if_not_found(self):
-        # If getDebugArchive doesn't find a debug archive, that's an
-        # OptionValueError.
-        distro = self.makeDistro()
-        script = self.makeScript(distro)
-        self.assertRaises(OptionValueError, script.getDebugArchive, distro)
-
-    def test_getDebugArchive_ignores_other_archive_purposes(self):
-        # getDebugArchive does not return archives that aren't debug
-        # archives.
-        distro = self.makeDistro()
-        script = self.makeScript(distro)
-        self.factory.makeArchive(distro, purpose=ArchivePurpose.PARTNER)
-        self.assertRaises(OptionValueError, script.getDebugArchive, distro)
-
-    def test_getDebugArchive_ignores_other_distros(self):
-        # getDebugArchive won't return an archive for the wrong
-        # distribution.
-        distro = self.makeDistro()
-        self.factory.makeArchive(purpose=ArchivePurpose.DEBUG)
-        script = self.makeScript(distro)
-        self.assertRaises(OptionValueError, script.getDebugArchive, distro)
-
     def test_getCopyArchives_returns_list(self):
         # getCopyArchives returns a list of archives.
         distro = self.makeDistro()
@@ -819,14 +736,6 @@
         script = self.makeScript(distro, ['--ppa'])
         self.assertContentEqual([], script.getTargetArchives(distro))
 
-    def test_getTargetArchives_gets_primary_debug_archive(self):
-        # If the selected exclusive option is "primary-debug,"
-        # getTargetArchives looks for a debug archive.
-        distro = self.makeDistro()
-        debug = self.factory.makeArchive(distro, purpose=ArchivePurpose.DEBUG)
-        script = self.makeScript(distro, ['--primary-debug'])
-        self.assertContentEqual([debug], script.getTargetArchives(distro))
-
     def test_getTargetArchives_gets_copy_archives(self):
         # If the selected exclusive option is "copy-archive,"
         # getTargetArchives looks for a copy archive.
@@ -859,7 +768,7 @@
         # nothing and return False to indicate the fact.
         distro = self.makeDistro()
         archive = self.factory.makeArchive(
-            distro, purpose=ArchivePurpose.DEBUG)
+            distro, purpose=ArchivePurpose.PARTNER)
         script = self.makeScript(distro)
         deletion_done = script.deleteArchive(archive, None)
         self.assertFalse(deletion_done)

=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py	2013-05-01 19:28:34 +0000
+++ lib/lp/soyuz/tests/test_publishing.py	2013-05-01 19:28:34 +0000
@@ -1298,9 +1298,6 @@
         will supersede themselves, and vanish entirely (bug #178102).  We
         check both DEBs and DDEBs.
         """
-        getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=self.ubuntutest.owner,
-            distribution=self.ubuntutest)
         universe = getUtility(IComponentSet)['universe']
         games = getUtility(ISectionSet)['games']
         for name, override in (
@@ -1368,10 +1365,6 @@
         DDEB publications should be superseded when their corresponding DEB
         is.
         """
-        getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=self.ubuntutest.owner,
-            distribution=self.ubuntutest)
-
         # Each of these will return (i386 deb, i386 ddeb, hppa deb,
         # hppa ddeb).
         bins = self.getPubBinaries(architecturespecific=True, with_debug=True)
@@ -1394,10 +1387,6 @@
         Since DDEBs are superseded when their DEBs are, there's no need to
         for them supersede anything themselves. Any such attempt is an error.
         """
-        getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=self.ubuntutest.owner,
-            distribution=self.ubuntutest)
-
         # This will return (i386 deb, i386 ddeb, hppa deb, hppa ddeb).
         bins = self.getPubBinaries(architecturespecific=True, with_debug=True)
         self.assertRaises(AssertionError, bins[0].supersede, bins[1])
@@ -1701,9 +1690,6 @@
 
     def test_changes_ddeb(self):
         # BPPH.changeOverride changes the properties of DDEB publications.
-        getUtility(IArchiveSet).new(
-            purpose=ArchivePurpose.DEBUG, owner=self.ubuntutest.owner,
-            distribution=self.ubuntutest)
         self.assertCanOverride(
             ddeb=True,
             new_component="universe", new_section="misc", new_priority="extra",