Bug 1530600 - Fail to package if a jarlog was given but it contains no data for omnijars. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 05 Mar 2019 22:11:50 +0000
changeset 520976 7452e8eb8738b77c509911ff4c3058246d16ea0d
parent 520975 54ed5eac2abca2519704c74bc5c421b846031504
child 520977 6b1f784267633a74b9f9395352a5332dcf44f5c9
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1530600
milestone67.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 1530600 - Fail to package if a jarlog was given but it contains no data for omnijars. r=chmanchester Differential Revision: https://phabricator.services.mozilla.com/D21657
toolkit/mozapps/installer/packager.py
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -313,24 +313,33 @@ def main():
     if buildconfig.substs.get('MOZ_COPY_PDBS'):
         for p, f in copier:
             if isinstance(f, ExecutableFile):
                 pdbname = os.path.splitext(f.inputs()[0])[0] + '.pdb'
                 if os.path.exists(pdbname):
                     copier.add(os.path.basename(pdbname), File(pdbname))
 
     # Setup preloading
-    if args.jarlog and os.path.exists(args.jarlog):
+    if args.jarlog:
+        if not os.path.exists(args.jarlog):
+            raise Exception('Cannot find jar log: %s' % args.jarlog)
+        omnijars = []
+        if isinstance(formatter, OmniJarFormatter):
+            omnijars = [mozpath.join(base, buildconfig.substs['OMNIJAR_NAME'])
+                        for base in sink.packager.get_bases(addons=False)]
+
         from mozpack.mozjar import JarLog
         log = JarLog(args.jarlog)
         for p, f in copier:
             if not isinstance(f, Jarrer):
                 continue
             if p in log:
                 f.preload(log[p])
+            elif p in omnijars:
+                raise Exception('No jar log data for %s' % p)
 
     copier.copy(args.destination)
     generate_precomplete(os.path.normpath(os.path.join(args.destination,
                                                        respath)))
 
 
 if __name__ == '__main__':
     main()