Bug 1240323 - Fix installation of binary components in a subdir of dist/bin for linux artifact builds. r=nalexander
A recent change regressed this behavior -- while an artifact build runs, it
doesn't load certain "about:" pages due to missing libraries in subdirectories
of dist/bin.
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -188,36 +188,38 @@ class LinuxArtifactJob(ArtifactJob):
'firefox/crashreporter',
'firefox/dependentlibs.list',
'firefox/firefox',
'firefox/firefox-bin',
'firefox/platform.ini',
'firefox/plugin-container',
'firefox/updater',
'firefox/webapprt-stub',
- 'firefox/*.so',
+ 'firefox/**/*.so',
}
def process_package_artifact(self, filename, processed_filename):
added_entry = False
with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
with tarfile.open(filename) as reader:
for f in reader:
if not f.isfile():
continue
if not any(mozpath.match(f.name, p) for p in self.package_artifact_patterns):
continue
- basename = mozpath.basename(f.name)
+ # We strip off the relative "firefox/" bit from the path,
+ # but otherwise preserve it.
+ destpath = mozpath.relpath(f.name, "firefox")
self.log(logging.INFO, 'artifact',
- {'basename': basename},
- 'Adding {basename} to processed archive')
- writer.add(basename.encode('utf-8'), reader.extractfile(f), mode=f.mode)
+ {'destpath': destpath},
+ 'Adding {destpath} to processed archive')
+ writer.add(destpath.encode('utf-8'), reader.extractfile(f), mode=f.mode)
added_entry = True
if not added_entry:
raise ValueError('Archive format changed! No pattern from "{patterns}" '
'matched an archive path.'.format(
patterns=LinuxArtifactJob.package_artifact_patterns))