Bug 1239678 - fix dll inclusion pattern on Windows and the placement of nested dlls like browsercomps and clearkey, r?nalexander draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 14 Jan 2016 14:56:59 +0000
changeset 321721 61e8971594cf88bd55dfbe9bb03da999daeba548
parent 321720 34360c913f6a3a2f7d37ec0141393b1900a05f33
child 512955 1cbc5c9c722a383ecc1c740f91f45a1ec8e97588
push id9439
push usergijskruitbosch@gmail.com
push dateThu, 14 Jan 2016 14:57:17 +0000
reviewersnalexander
bugs1239678
milestone46.0a1
Bug 1239678 - fix dll inclusion pattern on Windows and the placement of nested dlls like browsercomps and clearkey, r?nalexander
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -314,17 +314,17 @@ class MacArtifactJob(ArtifactJob):
                 pass
 
 
 class WinArtifactJob(ArtifactJob):
     package_artifact_patterns = {
         'firefox/dependentlibs.list',
         'firefox/platform.ini',
         'firefox/application.ini',
-        'firefox/*.dll',
+        'firefox/**/*.dll',
         'firefox/*.exe',
     }
     # These are a subset of TEST_HARNESS_BINS in testing/mochitest/Makefile.in.
     test_artifact_patterns = {
         'bin/BadCertServer.exe',
         'bin/GenerateOCSPResponse.exe',
         'bin/OCSPStaplingServer.exe',
         'bin/certutil.exe',
@@ -336,17 +336,18 @@ class WinArtifactJob(ArtifactJob):
 
     def process_package_artifact(self, filename, processed_filename):
         added_entry = False
         with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
             for f in JarReader(filename):
                 if not any(mozpath.match(f.filename, p) for p in self.package_artifact_patterns):
                     continue
 
-                basename = mozpath.basename(f.filename)
+                # strip off the relative "firefox/" bit from the path:
+                basename = mozpath.relpath(f.filename, "firefox")
                 self.log(logging.INFO, 'artifact',
                     {'basename': basename},
                     'Adding {basename} to processed archive')
                 writer.add(basename.encode('utf-8'), f)
                 added_entry = True
 
         if not added_entry:
             raise ValueError('Archive format changed! No pattern from "{patterns}"'