← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/yay-sha512 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/yay-sha512 into lp:launchpad.

Commit message:
Disable SHA512 in apt-ftparchive for now, as it means rehashing basically every source file every time. We'll enable it again when apt-ftparchive does source caching.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/yay-sha512/+merge/203814

After upgrading pepo to precise, apt-ftparchive over trusty/source takes about 45 minutes. We think this is because a-f ends up rehashing every file with SHA-512, so let's disable SHA-512 until we implement source caching in a-f.
-- 
https://code.launchpad.net/~wgrant/launchpad/yay-sha512/+merge/203814
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/yay-sha512 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-01-29 18:25:21 +0000
@@ -72,7 +72,7 @@
     DeLinkLimit 0;
     MaxContentsChange 12000;
     FileMode 0644;
-}
+};
 
 TreeDefault
 {
@@ -80,6 +80,11 @@
     Contents::Header "%s/contents.header";
 };
 
+FTPArchive
+{
+    SHA512 "false";
+};
+
 """
 
 STANZA_TEMPLATE = """

=== 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-01-29 18:25:21 +0000
@@ -15,7 +15,7 @@
     DeLinkLimit 0;
     MaxContentsChange 12000;
     FileMode 0644;
-}
+};
 
 TreeDefault
 {
@@ -23,6 +23,11 @@
     Contents::Header "/var/tmp/archive/ubuntutest-misc/contents.header";
 };
 
+FTPArchive
+{
+    SHA512 "false";
+};
+
 
 tree "dists/hoary-test"
 {

=== 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-01-29 18:25:21 +0000
@@ -15,7 +15,7 @@
     DeLinkLimit 0;
     MaxContentsChange 12000;
     FileMode 0644;
-}
+};
 
 TreeDefault
 {
@@ -23,6 +23,11 @@
     Contents::Header "/var/tmp/archive/ubuntutest-misc/contents.header";
 };
 
+FTPArchive
+{
+    SHA512 "false";
+};
+
 
 tree "dists/hoary-test-updates"
 {

=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py	2014-01-17 03:21:05 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py	2014-01-29 18:25:21 +0000
@@ -466,7 +466,7 @@
         # Test that a publisher run now will generate an empty apt
         # config and nothing else.
         apt_conf = fa.generateConfig()
-        assert len(file(apt_conf).readlines()) == 25
+        self.assertEqual(30, len(file(apt_conf).readlines()))
 
         # XXX cprov 2007-03-21: see above, do not run a-f on dev machines.
         fa.runApt(apt_conf)


Follow ups