Bug 1207890 - Post: Hack to make |mach run| for Mac OS X artifact builds. r=me

--HG--
extra : commitid : Ef8c2hR0pzr
extra : rebase_source : d1a76d9e79d27cdbb9567ceecf01dc15c9f4f300
This commit is contained in:
Nick Alexander 2015-12-30 20:16:23 -08:00
Родитель cde466f5ad
Коммит 6dbda99125
1 изменённых файлов: 45 добавлений и 30 удалений

Просмотреть файл

@ -160,43 +160,58 @@ class MacArtifactJob(ArtifactJob):
bundle_name = 'Nightly.app' bundle_name = 'Nightly.app'
source = mozpath.join(tempdir, bundle_name) source = mozpath.join(tempdir, bundle_name)
paths = [ # These get copied into dist/bin without the path, so "root/a/b/c" -> "dist/bin/c".
'Contents/MacOS/crashreporter.app/Contents/MacOS/crashreporter', paths_no_keep_path = ('Contents/MacOS', [
'Contents/MacOS/firefox', 'crashreporter.app/Contents/MacOS/crashreporter',
'Contents/MacOS/firefox-bin', 'firefox',
'Contents/MacOS/libfreebl3.dylib', 'firefox-bin',
'Contents/MacOS/liblgpllibs.dylib', 'libfreebl3.dylib',
# 'Contents/MacOS/liblogalloc.dylib', 'liblgpllibs.dylib',
'Contents/MacOS/libmozglue.dylib', # 'liblogalloc.dylib',
'Contents/MacOS/libnss3.dylib', 'libmozglue.dylib',
'Contents/MacOS/libnssckbi.dylib', 'libnss3.dylib',
'Contents/MacOS/libnssdbm3.dylib', 'libnssckbi.dylib',
'Contents/MacOS/libplugin_child_interpose.dylib', 'libnssdbm3.dylib',
# 'Contents/MacOS/libreplace_jemalloc.dylib', 'libplugin_child_interpose.dylib',
# 'Contents/MacOS/libreplace_malloc.dylib', # 'libreplace_jemalloc.dylib',
'Contents/MacOS/libsoftokn3.dylib', # 'libreplace_malloc.dylib',
'Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container', 'libsoftokn3.dylib',
'Contents/MacOS/updater.app/Contents/MacOS/updater', 'plugin-container.app/Contents/MacOS/plugin-container',
# 'Contents/MacOS/xpcshell', 'updater.app/Contents/MacOS/updater',
'Contents/MacOS/XUL', # 'xpcshell',
'Contents/Resources/browser/components/components.manifest', 'XUL',
'Contents/Resources/browser/components/libbrowsercomps.dylib', ])
'Contents/Resources/dependentlibs.list',
# 'Contents/Resources/firefox', # These get copied into dist/bin with the path, so "root/a/b/c" -> "dist/bin/a/b/c".
'Contents/Resources/gmp-clearkey/0.1/libclearkey.dylib', paths_keep_path = ('Contents/Resources', [
# 'Contents/Resources/gmp-fake/1.0/libfake.dylib', 'browser/components/libbrowsercomps.dylib',
# 'Contents/Resources/gmp-fakeopenh264/1.0/libfakeopenh264.dylib', 'dependentlibs.list',
'Contents/Resources/webapprt-stub', # 'firefox',
] 'gmp-clearkey/0.1/libclearkey.dylib',
# 'gmp-fake/1.0/libfake.dylib',
# 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
'webapprt-stub',
])
with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer: with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
finder = FileFinder(source) root, paths = paths_no_keep_path
finder = FileFinder(mozpath.join(source, root))
for path in paths: for path in paths:
for p, f in finder.find(path): for p, f in finder.find(path):
self.log(logging.INFO, 'artifact', self.log(logging.INFO, 'artifact',
{'path': path}, {'path': path},
'Adding {path} to processed archive') 'Adding {path} to processed archive')
writer.add(os.path.basename(p).encode('utf-8'), f, mode=os.stat(mozpath.join(source, p)).st_mode) writer.add(os.path.basename(p).encode('utf-8'), f, mode=os.stat(mozpath.join(finder.base, p)).st_mode)
root, paths = paths_keep_path
finder = FileFinder(mozpath.join(source, root))
for path in paths:
for p, f in finder.find(path):
self.log(logging.INFO, 'artifact',
{'path': path},
'Adding {path} to processed archive')
writer.add(p.encode('utf-8'), f, mode=os.stat(mozpath.join(finder.base, p)).st_mode)
finally: finally:
try: try:
shutil.rmtree(tempdir) shutil.rmtree(tempdir)