mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
Bug 1371245 - Install minidump-analyzer to its final location in artifact builds. r=nalexander
The MacOS client artifact code relies on its own bookkeeping to install binaries to their final locations and assumes that files installed to 'Contents/MacOS' will generally be installed to dist/bin by the build system. This commit extends this logic to account for minidump-analyzer, which is installed to directly to crashreporter.app/Contents/MacOS by setting DIST_SUBDIR in moz.build. Ideally we would rely on build system metadata to install binaries in artifact builds, however this is non-trivial as the relevant moz.build data isn't read in non-compile-environment builds and originating builds do not expose it directly. MozReview-Commit-ID: BMmhtx1HKn7 --HG-- extra : rebase_source : ec02e7664dcd9fea4f035483e8856fa62966c1cb
This commit is contained in:
parent
83aa322bb6
commit
e0a507a728
@ -346,7 +346,6 @@ class MacArtifactJob(ArtifactJob):
|
||||
# These get copied into dist/bin without the path, so "root/a/b/c" -> "dist/bin/c".
|
||||
paths_no_keep_path = ('Contents/MacOS', [
|
||||
'crashreporter.app/Contents/MacOS/crashreporter',
|
||||
'crashreporter.app/Contents/MacOS/minidump-analyzer',
|
||||
'firefox',
|
||||
'firefox-bin',
|
||||
'libfreebl3.dylib',
|
||||
@ -370,15 +369,20 @@ class MacArtifactJob(ArtifactJob):
|
||||
])
|
||||
|
||||
# These get copied into dist/bin with the path, so "root/a/b/c" -> "dist/bin/a/b/c".
|
||||
paths_keep_path = ('Contents/Resources', [
|
||||
'browser/components/libbrowsercomps.dylib',
|
||||
'dependentlibs.list',
|
||||
# 'firefox',
|
||||
'gmp-clearkey/0.1/libclearkey.dylib',
|
||||
# 'gmp-fake/1.0/libfake.dylib',
|
||||
# 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
|
||||
'**/interfaces.xpt',
|
||||
])
|
||||
paths_keep_path = [
|
||||
('Contents/MacOS', [
|
||||
'crashreporter.app/Contents/MacOS/minidump-analyzer',
|
||||
]),
|
||||
('Contents/Resources', [
|
||||
'browser/components/libbrowsercomps.dylib',
|
||||
'dependentlibs.list',
|
||||
# 'firefox',
|
||||
'gmp-clearkey/0.1/libclearkey.dylib',
|
||||
# 'gmp-fake/1.0/libfake.dylib',
|
||||
# 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
|
||||
'**/interfaces.xpt',
|
||||
]),
|
||||
]
|
||||
|
||||
with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
|
||||
root, paths = paths_no_keep_path
|
||||
@ -391,15 +395,15 @@ class MacArtifactJob(ArtifactJob):
|
||||
destpath = mozpath.join('bin', os.path.basename(p))
|
||||
writer.add(destpath.encode('utf-8'), f, mode=f.mode)
|
||||
|
||||
root, paths = paths_keep_path
|
||||
finder = UnpackFinder(mozpath.join(source, root))
|
||||
for path in paths:
|
||||
for p, f in finder.find(path):
|
||||
self.log(logging.INFO, 'artifact',
|
||||
{'path': p},
|
||||
'Adding {path} to processed archive')
|
||||
destpath = mozpath.join('bin', p)
|
||||
writer.add(destpath.encode('utf-8'), f.open(), mode=f.mode)
|
||||
for root, paths in paths_keep_path:
|
||||
finder = UnpackFinder(mozpath.join(source, root))
|
||||
for path in paths:
|
||||
for p, f in finder.find(path):
|
||||
self.log(logging.INFO, 'artifact',
|
||||
{'path': p},
|
||||
'Adding {path} to processed archive')
|
||||
destpath = mozpath.join('bin', p)
|
||||
writer.add(destpath.encode('utf-8'), f.open(), mode=f.mode)
|
||||
|
||||
finally:
|
||||
os.chdir(oldcwd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user