← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~apw/launchpad/signing-cowboy-do-not-symlink into lp:launchpad

 

Andy Whitcroft has proposed merging lp:~apw/launchpad/signing-cowboy-do-not-symlink into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~apw/launchpad/signing-cowboy-do-not-symlink/+merge/295815

Stop symlinking uefi to signed dists.  This is causing severe mirroring issues.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~apw/launchpad/signing-cowboy-do-not-symlink 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 10:37:07 +0000
@@ -94,24 +94,11 @@
 
         self.setComponents(tarfile_path)
 
-        # Ensure we expose the results via uefi and signed in dists.
-        # If we already have a uefi directory move it to signed else
-        # make a new signed.  For compatibility ensure we have uefi
-        # symlink to signed.
-        # NOTE: we rely on "signed" and "uefi"  being in the same directory.
         dists_signed = os.path.join(
             pubconf.archiveroot, "dists", suite, "main", "signed")
-        dists_uefi = os.path.join(
-            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)
-            else:
-                os.makedirs(dists_signed, 0o755)
-        if not os.path.exists(dists_uefi):
-            os.symlink("signed", dists_uefi)
+            os.makedirs(dists_signed, 0o755)
 
-        # Extract into the "signed" path regardless of linking.
         self.targetdir = os.path.join(
             dists_signed, "%s-%s" % (self.package, self.arch))
         self.archiveroot = pubconf.archiveroot

=== 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 10:37:07 +0000
@@ -501,12 +501,12 @@
         self.process()
         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.islink(os.path.join(
+        #    self.getDistsPath(), "uefi")))
         self.assertTrue(os.path.exists(os.path.join(
             self.getSignedPath("test", "amd64"), "1.0", "empty.efi")))
-        self.assertTrue(os.path.exists(os.path.join(
-            self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
+        #self.assertTrue(os.path.exists(os.path.join(
+        #    self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
 
     def test_installed_existing_uefi(self):
         # Files in the tarball are installed correctly.
@@ -517,12 +517,12 @@
         self.process()
         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.islink(os.path.join(
+        #   self.getDistsPath(), "uefi")))
         self.assertTrue(os.path.exists(os.path.join(
             self.getSignedPath("test", "amd64"), "1.0", "empty.efi")))
-        self.assertTrue(os.path.exists(os.path.join(
-            self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
+        #elf.assertTrue(os.path.exists(os.path.join(
+        #   self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
 
     def test_installed_existing_signing(self):
         # Files in the tarball are installed correctly.
@@ -533,12 +533,12 @@
         self.process()
         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.islink(os.path.join(
+        #    self.getDistsPath(), "uefi")))
         self.assertTrue(os.path.exists(os.path.join(
             self.getSignedPath("test", "amd64"), "1.0", "empty.efi")))
-        self.assertTrue(os.path.exists(os.path.join(
-            self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
+        #self.assertTrue(os.path.exists(os.path.join(
+        #    self.getUefiPath("test", "amd64"), "1.0", "empty.efi")))
 
     def test_create_uefi_keys_autokey_off(self):
         # Keys are not created.


Follow ups