← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/ftparchive-srccachedb into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/ftparchive-srccachedb into lp:launchpad.

Commit message:
Add configuration for apt-ftparchive source caching.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1328585 in Launchpad itself: "Use apt-ftparchive source caching"
  https://bugs.launchpad.net/launchpad/+bug/1328585

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/ftparchive-srccachedb/+merge/222679

Add configuration for apt-ftparchive source caching.

I've tested a build of apt-ftparchive from Debian's git repository with a copy of the production apt.conf edited by hand to match this change and use separate paths, and it behaves as I'd expect.  We'll need to confirm on dogfood that it doesn't regress with the current version of apt-ftparchive, of course, though I'm confident that the new configuration key will simply be ignored.
-- 
https://code.launchpad.net/~cjwatson/launchpad/ftparchive-srccachedb/+merge/222679
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/ftparchive-srccachedb into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/model/ftparchive.py'
--- lib/lp/archivepublisher/model/ftparchive.py	2014-01-17 02:03:41 +0000
+++ lib/lp/archivepublisher/model/ftparchive.py	2014-06-10 16:09:30 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 from collections import defaultdict
@@ -94,6 +94,7 @@
     %(HIDEEXTRA)sExtraOverride "override.%(DISTRORELEASE)s.extra.$(SECTION)";
     Packages::Extensions "%(EXTENSIONS)s";
     BinCacheDB "packages-%(CACHEINSERT)s$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "%(LONGDESCRIPTION)s";
 }

=== modified file 'lib/lp/archivepublisher/tests/apt-data/apt.conf'
--- lib/lp/archivepublisher/tests/apt-data/apt.conf	2014-01-17 03:21:05 +0000
+++ lib/lp/archivepublisher/tests/apt-data/apt.conf	2014-06-10 16:09:30 +0000
@@ -35,6 +35,7 @@
     ExtraOverride "override.hoary-test.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -51,6 +52,7 @@
     // ExtraOverride "override.hoary-test.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -67,6 +69,7 @@
     // ExtraOverride "override.hoary-test.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -83,6 +86,7 @@
     // ExtraOverride "override.hoary-test.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -99,6 +103,7 @@
     // ExtraOverride "override.hoary-test.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -115,6 +120,7 @@
     ExtraOverride "override.hoary-test-security.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -131,6 +137,7 @@
     // ExtraOverride "override.hoary-test-security.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -147,6 +154,7 @@
     // ExtraOverride "override.hoary-test-security.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -163,6 +171,7 @@
     // ExtraOverride "override.hoary-test-security.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -179,6 +188,7 @@
     // ExtraOverride "override.hoary-test-security.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -195,6 +205,7 @@
     ExtraOverride "override.hoary-test-updates.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -211,6 +222,7 @@
     // ExtraOverride "override.hoary-test-updates.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -227,6 +239,7 @@
     // ExtraOverride "override.hoary-test-updates.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -243,6 +256,7 @@
     // ExtraOverride "override.hoary-test-updates.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -259,6 +273,7 @@
     // ExtraOverride "override.hoary-test-updates.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -275,6 +290,7 @@
     ExtraOverride "override.hoary-test-proposed.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -291,6 +307,7 @@
     // ExtraOverride "override.hoary-test-proposed.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -307,6 +324,7 @@
     // ExtraOverride "override.hoary-test-proposed.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -323,6 +341,7 @@
     // ExtraOverride "override.hoary-test-proposed.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -339,6 +358,7 @@
     // ExtraOverride "override.hoary-test-proposed.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -355,6 +375,7 @@
     ExtraOverride "override.hoary-test-backports.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -371,6 +392,7 @@
     // ExtraOverride "override.hoary-test-backports.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -387,6 +409,7 @@
     // ExtraOverride "override.hoary-test-backports.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -403,6 +426,7 @@
     // ExtraOverride "override.hoary-test-backports.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -419,6 +443,7 @@
     // ExtraOverride "override.hoary-test-backports.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -435,6 +460,7 @@
     ExtraOverride "override.breezy-autotest.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "false";
 }
@@ -451,6 +477,7 @@
     ExtraOverride "override.breezy-autotest-security.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "false";
 }
@@ -467,6 +494,7 @@
     ExtraOverride "override.breezy-autotest-updates.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "false";
 }
@@ -483,6 +511,7 @@
     ExtraOverride "override.breezy-autotest-proposed.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "false";
 }
@@ -499,6 +528,7 @@
     ExtraOverride "override.breezy-autotest-backports.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "false";
 }

=== 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	2014-01-17 03:21:05 +0000
+++ lib/lp/archivepublisher/tests/apt-data/apt_conf_single_empty_suite_test	2014-06-10 16:09:30 +0000
@@ -35,6 +35,7 @@
     ExtraOverride "override.hoary-test-updates.extra.$(SECTION)";
     Packages::Extensions ".deb";
     BinCacheDB "packages-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -51,6 +52,7 @@
     // ExtraOverride "override.hoary-test-updates.main.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -67,6 +69,7 @@
     // ExtraOverride "override.hoary-test-updates.restricted.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -83,6 +86,7 @@
     // ExtraOverride "override.hoary-test-updates.universe.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }
@@ -99,6 +103,7 @@
     // ExtraOverride "override.hoary-test-updates.multiverse.extra.$(SECTION)";
     Packages::Extensions ".udeb";
     BinCacheDB "packages-debian-installer-$(ARCH).db";
+    SrcCacheDB "sources.db";
     Contents " ";
     LongDescription "true";
 }


Follow ups