← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~apw/launchpad/signing-be-kinder-to-mirrors into lp:launchpad

 

Andy Whitcroft has proposed merging lp:~apw/launchpad/signing-be-kinder-to-mirrors into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~apw/launchpad/signing-be-kinder-to-mirrors/+merge/295810

Signing should not replace directories with symlinks to avoid pain for mirrors.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~apw/launchpad/signing-be-kinder-to-mirrors into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/signing.py'
--- lib/lp/archivepublisher/signing.py	2016-05-24 17:41:57 +0000
+++ lib/lp/archivepublisher/signing.py	2016-05-26 09:59:21 +0000
@@ -105,7 +105,7 @@
             pubconf.archiveroot, "dists", suite, "main", "uefi")
         if not os.path.exists(dists_signed):
             if os.path.isdir(dists_uefi):
-                os.rename(dists_uefi, dists_signed)
+                os.symlink("uefi", dists_signed)
             else:
                 os.makedirs(dists_signed, 0o755)
         if not os.path.exists(dists_uefi):

=== modified file 'lib/lp/archivepublisher/tests/test_signing.py'
--- lib/lp/archivepublisher/tests/test_signing.py	2016-05-24 21:33:32 +0000
+++ lib/lp/archivepublisher/tests/test_signing.py	2016-05-26 09:59:21 +0000
@@ -515,9 +515,9 @@
         self.openArchive("test", "1.0", "amd64")
         self.archive.add_file("1.0/empty.efi", "")
         self.process()
+        self.assertTrue(os.path.islink(os.path.join(
+            self.getDistsPath(), "signed")))
         self.assertTrue(os.path.isdir(os.path.join(
-            self.getDistsPath(), "signed")))
-        self.assertTrue(os.path.islink(os.path.join(
             self.getDistsPath(), "uefi")))
         self.assertTrue(os.path.exists(os.path.join(
             self.getSignedPath("test", "amd64"), "1.0", "empty.efi")))


Follow ups