← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/always-index-d-i into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/always-index-d-i into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #118227 in Launchpad itself: "main/debian-installer missing from Release files"
  https://bugs.launchpad.net/launchpad/+bug/118227
  Bug #240965 in Launchpad itself: "publisher doesn't deal with pockets becoming empty"
  https://bugs.launchpad.net/launchpad/+bug/240965

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/always-index-d-i/+merge/85664

= Summary =

Launchpad's ftparchive handler currently only publishes debian-installer indexes if there are any udebs in the relevant pocket/component.  This is suboptimal: it means that the configurations of several mirroring tools have to be modified depending on whether pockets/components happen to have any published udebs (bug 118227), and it means that indexes are not correctly republished when all the udebs in a pocket are removed (bug 240965).  It would be simpler, more robust, and more in line with the NoMoreFtpArchive approach if we just always published debian-installer indexes.

== Proposed fix ==

JFDI unconditionally.  lib/lp/soyuz/model/ftparchive.py actually has quite a few contortions to do this conditionally, one of which had an XXX comment associated with it.

== Pre-implementation notes ==

<cjwatson> bigjools: I'd like to fix bug 619088; it's been annoying me for a while.  Is there likely to be any problem with just changing FTPArchiveHandler to remove a slew of "are there any udebs to publish" conditionals?
<cjwatson> (Also bug 118227 and probably bug 240965.)
<bigjools> cjwatson: hard to say without looking in more detail but it can't be that hard
<cjwatson> I don't know why it was made conditional in the first place; I'm assuming it was a misplaced sense of tidiness

== Implementation details ==

Fixing the sample test data was tedious in excelsis.  But we knew that.  I fixed the expected/observed ordering of an assertEqual in the tests while I was in there, since it confused me.

== Tests ==

bin/test -vvct 'archivepublisher|soyuz'

== Demo and Q/A ==

Take a suite on dogfood that doesn't contain any udebs.  Make it dirty (e.g. by uploading to it), publish it, and make sure that it now contains debian-installer indexes.  Upload a udeb to it, publish it, and make sure that appears in the debian-installer indexes.  Remove that udeb, publish the suite again, and make sure that the debian-installer indexes are now empty.

== lint ==

Loads of line-length warnings in ./lib/lp/archivepublisher/tests/apt-data/apt.conf and ./lib/lp/archivepublisher/tests/apt-data/apt_conf_single_empty_suite_test that we don't care about.
-- 
https://code.launchpad.net/~cjwatson/launchpad/always-index-d-i/+merge/85664
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/always-index-d-i into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/model/ftparchive.py'
--- lib/lp/archivepublisher/model/ftparchive.py	2011-09-19 06:57:55 +0000
+++ lib/lp/archivepublisher/model/ftparchive.py	2011-12-14 14:15:30 +0000
@@ -121,14 +121,6 @@
         self.distro = distro
         self.publisher = publisher
 
-        # We need somewhere to note down where the debian-installer
-        # components came from. in _di_release_components we store
-        # sets, keyed by distroseries name of the component names
-        # which contain debian-installer binaries.  This is filled out
-        # when generating overrides and file lists, and then consumed
-        # when generating apt-ftparchive configuration.
-        self._di_release_components = {}
-
     def run(self, is_careful):
         """Do the entire generation and run process."""
         self.createEmptyPocketRequests(is_careful)
@@ -216,21 +208,15 @@
 
     def createEmptyPocketRequest(self, distroseries, pocket, comp):
         """Creates empty files for a release pocket and distroseries"""
-        if pocket == PackagePublishingPocket.RELEASE:
-            # organize distroseries and component pair as
-            # debian-installer -> distroseries_component
-            # internal map. Only the main pocket actually
-            # needs these, though.
-            self._di_release_components.setdefault(
-                distroseries.name, set()).add(comp)
-            f_touch(self._config.overrideroot,
-                    ".".join(["override", distroseries.name, comp,
-                              "debian-installer"]))
-
         suite = distroseries.getSuite(pocket)
 
         # Create empty override lists.
-        for path in ((comp, ), ("extra", comp), (comp, "src")):
+        for path in (
+            (comp, ),
+            ("extra", comp),
+            (comp, "debian-installer"),
+            (comp, "src"),
+            ):
             f_touch(os.path.join(
                 self._config.overrideroot,
                 ".".join(("override", suite) + path)))
@@ -421,12 +407,6 @@
             if priority:
                 # We pick up debian-installer packages here
                 if section.endswith("debian-installer"):
-                    # XXX: kiko 2006-08-24: This is actually redundant with
-                    # what is done in createEmptyPocketRequests. However,
-                    # this code does make it possible to unit test this
-                    # method, so I'm sure if it should be removed.
-                    self._di_release_components.setdefault(
-                        suite, set()).add(component)
                     suboverride['d-i'].add((packagename, priority, section))
                 else:
                     suboverride['bin'].add((packagename, priority, section))
@@ -697,9 +677,9 @@
                             architecture, file_names, suite, component)
 
     def writeFileList(self, arch, file_names, dr_pocketed, component):
-        """Outputs a file list for a series and architecture.
+        """Output file lists for a series and architecture.
 
-        Also outputs a debian-installer file list if necessary.
+        This includes a debian-installer file list.
         """
         files = []
         di_files = []
@@ -708,11 +688,7 @@
         f = file(f_path, "w")
         for name in file_names:
             if name.endswith(".udeb"):
-                # Once again, note that this component in this
-                # distroseries has d-i elements
-                self._di_release_components.setdefault(
-                    dr_pocketed, set()).add(component)
-                # And note the name for output later
+                # Note the name for output later
                 di_files.append(name)
             else:
                 files.append(name)
@@ -721,18 +697,18 @@
         f.write("\n")
         f.close()
 
-        if len(di_files):
-            # Once again, some d-i stuff to write out...
-            self.log.debug("Writing d-i file list for %s/%s/%s" % (
+        # Once again, some d-i stuff to write out...
+        self.log.debug(
+            "Writing d-i file list for %s/%s/%s" % (
                 dr_pocketed, component, arch))
-            di_overrides = os.path.join(self._config.overrideroot,
-                                        "%s_%s_debian-installer_%s" %
-                                        (dr_pocketed, component, arch))
-            f = open(di_overrides, "w")
-            di_files.sort(key=package_name)
-            f.write("\n".join(di_files))
-            f.write("\n")
-            f.close()
+        di_overrides = os.path.join(
+            self._config.overrideroot,
+            "%s_%s_debian-installer_%s" % (dr_pocketed, component, arch))
+        f = open(di_overrides, "w")
+        di_files.sort(key=package_name)
+        f.write("\n".join(di_files))
+        f.write("\n")
+        f.close()
 
     #
     # Config Generation
@@ -810,8 +786,8 @@
                                     else "false",
                          })
 
-        if archs and suite in self._di_release_components:
-            for component in self._di_release_components[suite]:
+        if archs:
+            for component in comps:
                 apt_config.write(STANZA_TEMPLATE % {
                     "LISTPATH": self._config.overrideroot,
                     "DISTRORELEASEONDISK": "%s/%s" % (suite, component),
@@ -830,15 +806,10 @@
         for comp in comps:
             component_path = os.path.join(
                 self._config.distsroot, suite, comp)
-            base_paths = [component_path]
-            if suite in self._di_release_components:
-                if comp in self._di_release_components[suite]:
-                    base_paths.append(os.path.join(component_path,
-                                                   "debian-installer"))
-            for base_path in base_paths:
-                if "debian-installer" not in base_path:
-                    safe_mkdir(os.path.join(base_path, "source"))
-                    if not distroseries.include_long_descriptions:
-                        safe_mkdir(os.path.join(base_path, "i18n"))
-                for arch in archs:
-                    safe_mkdir(os.path.join(base_path, "binary-" + arch))
+            safe_mkdir(os.path.join(component_path, "source"))
+            if not distroseries.include_long_descriptions:
+                safe_mkdir(os.path.join(component_path, "i18n"))
+            for arch in archs:
+                safe_mkdir(os.path.join(component_path, "binary-" + arch))
+                safe_mkdir(os.path.join(
+                    component_path, "debian-installer", "binary-" + arch))

=== modified file 'lib/lp/archivepublisher/tests/apt-data/apt.conf'
--- lib/lp/archivepublisher/tests/apt-data/apt.conf	2011-09-15 11:41:39 +0000
+++ lib/lp/archivepublisher/tests/apt-data/apt.conf	2011-12-14 14:15:30 +0000
@@ -39,6 +39,22 @@
 }
 
 
+tree "dists/hoary-test/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test.main.$(SECTION)";
+    SrcOverride "override.hoary-test.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
 tree "dists/hoary-test/restricted"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test_restricted_$(SECTION)_binary-$(ARCH)";
@@ -55,15 +71,15 @@
 }
 
 
-tree "dists/hoary-test/main"
+tree "dists/hoary-test/universe"
 {
-    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test_main_$(SECTION)_binary-$(ARCH)";
-    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test.main_$(SECTION)_source";
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test.universe_$(SECTION)_source";
     Sections "debian-installer";
     Architectures "amd64 i386";
-    BinOverride "override.hoary-test.main.$(SECTION)";
-    SrcOverride "override.hoary-test.main.$(SECTION).src";
-    // ExtraOverride "override.hoary-test.main.extra.$(SECTION)";
+    BinOverride "override.hoary-test.universe.$(SECTION)";
+    SrcOverride "override.hoary-test.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
     Contents " ";
@@ -87,22 +103,6 @@
 }
 
 
-tree "dists/hoary-test/universe"
-{
-    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test_universe_$(SECTION)_binary-$(ARCH)";
-    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test.universe_$(SECTION)_source";
-    Sections "debian-installer";
-    Architectures "amd64 i386";
-    BinOverride "override.hoary-test.universe.$(SECTION)";
-    SrcOverride "override.hoary-test.universe.$(SECTION).src";
-    // ExtraOverride "override.hoary-test.universe.extra.$(SECTION)";
-    Packages::Extensions ".udeb";
-    BinCacheDB "packages-debian-installer-$(ARCH).db";
-    Contents " ";
-    LongDescription "true";
-}
-
-
 tree "dists/hoary-test-security"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security_$(SECTION)_binary-$(ARCH)";
@@ -119,6 +119,70 @@
 }
 
 
+tree "dists/hoary-test-security/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-security.main.$(SECTION)";
+    SrcOverride "override.hoary-test-security.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-security.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-security/restricted"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security_restricted_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security.restricted_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-security.restricted.$(SECTION)";
+    SrcOverride "override.hoary-test-security.restricted.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-security.restricted.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-security/universe"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security.universe_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-security.universe.$(SECTION)";
+    SrcOverride "override.hoary-test-security.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-security.universe.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-security/multiverse"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security_multiverse_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-security.multiverse_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-security.multiverse.$(SECTION)";
+    SrcOverride "override.hoary-test-security.multiverse.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-security.multiverse.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
 tree "dists/hoary-test-updates"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_$(SECTION)_binary-$(ARCH)";
@@ -135,6 +199,70 @@
 }
 
 
+tree "dists/hoary-test-updates/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.main.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/restricted"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_restricted_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.restricted_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.restricted.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.restricted.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.restricted.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/universe"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.universe_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.universe.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.universe.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/multiverse"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_multiverse_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.multiverse_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.multiverse.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.multiverse.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.multiverse.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
 tree "dists/hoary-test-proposed"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed_$(SECTION)_binary-$(ARCH)";
@@ -151,6 +279,70 @@
 }
 
 
+tree "dists/hoary-test-proposed/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-proposed.main.$(SECTION)";
+    SrcOverride "override.hoary-test-proposed.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-proposed.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-proposed/restricted"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed_restricted_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed.restricted_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-proposed.restricted.$(SECTION)";
+    SrcOverride "override.hoary-test-proposed.restricted.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-proposed.restricted.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-proposed/universe"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed.universe_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-proposed.universe.$(SECTION)";
+    SrcOverride "override.hoary-test-proposed.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-proposed.universe.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-proposed/multiverse"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed_multiverse_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-proposed.multiverse_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-proposed.multiverse.$(SECTION)";
+    SrcOverride "override.hoary-test-proposed.multiverse.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-proposed.multiverse.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
 tree "dists/hoary-test-backports"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports_$(SECTION)_binary-$(ARCH)";
@@ -167,6 +359,70 @@
 }
 
 
+tree "dists/hoary-test-backports/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-backports.main.$(SECTION)";
+    SrcOverride "override.hoary-test-backports.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-backports.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-backports/restricted"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports_restricted_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports.restricted_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-backports.restricted.$(SECTION)";
+    SrcOverride "override.hoary-test-backports.restricted.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-backports.restricted.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-backports/universe"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports.universe_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-backports.universe.$(SECTION)";
+    SrcOverride "override.hoary-test-backports.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-backports.universe.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-backports/multiverse"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports_multiverse_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-backports.multiverse_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-backports.multiverse.$(SECTION)";
+    SrcOverride "override.hoary-test-backports.multiverse.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-backports.multiverse.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
 tree "dists/breezy-autotest"
 {
     FileList "/var/tmp/archive/ubuntutest-overrides/breezy-autotest_$(SECTION)_binary-$(ARCH)";

=== modified file 'lib/lp/archivepublisher/tests/apt-data/apt_conf_single_empty_suite_test'
--- lib/lp/archivepublisher/tests/apt-data/apt_conf_single_empty_suite_test	2011-09-15 11:41:39 +0000
+++ lib/lp/archivepublisher/tests/apt-data/apt_conf_single_empty_suite_test	2011-12-14 14:15:30 +0000
@@ -38,3 +38,67 @@
     LongDescription "true";
 }
 
+
+tree "dists/hoary-test-updates/main"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_main_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.main_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.main.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.main.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.main.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/restricted"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_restricted_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.restricted_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.restricted.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.restricted.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.restricted.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/universe"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_universe_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.universe_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.universe.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.universe.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.universe.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+
+
+tree "dists/hoary-test-updates/multiverse"
+{
+    FileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates_multiverse_$(SECTION)_binary-$(ARCH)";
+    SourceFileList "/var/tmp/archive/ubuntutest-overrides/hoary-test-updates.multiverse_$(SECTION)_source";
+    Sections "debian-installer";
+    Architectures "amd64 i386";
+    BinOverride "override.hoary-test-updates.multiverse.$(SECTION)";
+    SrcOverride "override.hoary-test-updates.multiverse.$(SECTION).src";
+    // ExtraOverride "override.hoary-test-updates.multiverse.extra.$(SECTION)";
+    Packages::Extensions ".udeb";
+    BinCacheDB "packages-debian-installer-$(ARCH).db";
+    Contents " ";
+    LongDescription "true";
+}
+

=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py	2011-09-15 12:52:57 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py	2011-12-14 14:15:30 +0000
@@ -111,7 +111,12 @@
         # immediately obvious what the differences are.
         diff_lines = difflib.ndiff(
             sample_text.splitlines(), result_text.splitlines())
-        self.assertEqual(result_text, sample_text, '\n'.join(diff_lines))
+        self.assertEqual(sample_text, result_text, '\n'.join(diff_lines))
+
+    def _verifyEmpty(self, path):
+        """Assert that the given file is empty."""
+        with open(path) as result_file:
+            self.assertEqual("", result_file.read())
 
     def _addRepositoryFile(self, component, sourcename, leafname):
         """Create a repository file."""
@@ -307,6 +312,10 @@
         fa.runApt(apt_conf)
         self._verifyFile("Packages",
             os.path.join(self._distsdir, "hoary-test", "main", "binary-i386"))
+        self._verifyEmpty(
+            os.path.join(
+                self._distsdir, "hoary-test", "main", "debian-installer",
+                "binary-i386", "Packages"))
         self._verifyFile("Sources",
             os.path.join(self._distsdir, "hoary-test", "main", "source"),
             sanitize_apt_ftparchive_Sources_output)
@@ -379,6 +388,9 @@
                          "binary-i386", "Packages")))
         self.assertTrue(os.path.exists(
             os.path.join(self._distsdir, "hoary-test-updates", "main",
+                         "debian-installer", "binary-i386", "Packages")))
+        self.assertTrue(os.path.exists(
+            os.path.join(self._distsdir, "hoary-test-updates", "main",
                          "source", "Sources")))
 
         self.assertFalse(os.path.exists(
@@ -386,6 +398,9 @@
                          "binary-i386", "Packages")))
         self.assertFalse(os.path.exists(
             os.path.join(self._distsdir, "hoary-test", "main",
+                         "debian-installer", "binary-i386", "Packages")))
+        self.assertFalse(os.path.exists(
+            os.path.join(self._distsdir, "hoary-test", "main",
                          "source", "Sources")))