Bug 1525762: Part 1j - Work around XPI omni.jar packaging issues. r=bustage CLOSED TREE
authorKris Maglione <maglione.k@gmail.com>
Fri, 22 Mar 2019 17:29:21 -0700
changeset 466954 824a86797c8ecbb1a6395ac9fd76ad6abe724766
parent 466953 779ab99bea09b7ffea6c287cd56d9a8d9a06534f
child 466987 040b3a4dc232ee725c756dc054bc23f1baae26d2
push id112609
push usermaglione.k@gmail.com
push dateSat, 30 Mar 2019 21:33:45 +0000
treeherdermozilla-inbound@824a86797c8e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1525762
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1525762: Part 1j - Work around XPI omni.jar packaging issues. r=bustage CLOSED TREE We have some convoluted packaging logic to automatically package any directory with a manifest.json file as an XPI. Unfortunately, that logic also applies to extensions that are supposed to be part of omni.ja. It would be nice to have a cleaner way to filter out any resources which we've already flagged to be part of omni.ja, but this patch takes the simpler approach of just including anything that's in a modules/ directory, which is whitelisted for omni.ja elsewhere.
python/mozbuild/mozpack/packager/__init__.py
--- a/python/mozbuild/mozpack/packager/__init__.py
+++ b/python/mozbuild/mozpack/packager/__init__.py
@@ -280,17 +280,18 @@ class SimplePackager(object):
         else:
             self._file_queue.append(self.formatter.add, path, file)
             if mozpath.basename(path) == 'install.rdf':
                 addon = True
                 install_rdf = file.open().read()
                 if self.UNPACK_ADDON_RE.search(install_rdf):
                     addon = 'unpacked'
                 self._add_addon(mozpath.dirname(path), addon)
-            elif mozpath.basename(path) == 'manifest.json':
+            elif (mozpath.basename(path) == 'manifest.json' and
+                  'modules/' not in path):
                 manifest = file.open().read()
                 try:
                     parsed = json.loads(manifest)
                 except ValueError:
                     pass
                 if isinstance(parsed, dict) and 'manifest_version' in parsed:
                     self._add_addon(mozpath.dirname(path), True)