From 7460807a5607b92e2b57eb3693dc54b304f8d4cf Mon Sep 17 00:00:00 2001 From: Daniel Varga Date: Wed, 17 Oct 2018 22:02:34 +0300 Subject: [PATCH] Backed out changeset f9cf33c52739 (bug 1498715) on request by nalexander for local developer failures. a=backout --- python/mozbuild/mozpack/executables.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/python/mozbuild/mozpack/executables.py b/python/mozbuild/mozpack/executables.py index 65b4289c6ec5..95ab6c22094a 100644 --- a/python/mozbuild/mozpack/executables.py +++ b/python/mozbuild/mozpack/executables.py @@ -128,8 +128,6 @@ def xz_compress(path): ''' Execute xz to compress the given path. ''' - path = os.path.abspath(path) - if open(path, 'rb').read(5)[1:] == '7zXZ': print('%s is already compressed' % path) return @@ -157,28 +155,15 @@ def xz_compress(path): # We need to explicitly specify the LZMA filter chain to ensure consistent builds # across platforms. Note that the dict size must be less then 16MiB per the hardcoded - # value in mozglue/linker/XZStream.cpp. See: + # value in mozglue/linker/XZStream.cpp. This is the default LZMA filter chain for for + # xz-utils version 5.0. See: # https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/lzma/lzma_encoder_presets.c # https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/api/lzma/container.h#L31 - - if not substs.get('DEVELOPER_OPTIONS'): - # This is the default LZMA filter chain for for xz-utils version 5.0. See: - cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0']) - else: - # This is the filter chain for level=3, which is the highest - # compression fast preset. - cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=fast,nice=273,mf=hc4,depth=24']) - - print('xz-compressing %s with "%s"...' % (path, ' '.join(cmd))) - - import time - t0 = time.time() + cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0']) + print('xz-compressing %s with %s' % (path, ' '.join(cmd))) if subprocess.call(cmd) != 0: errors.fatal('Error executing ' + ' '.join(cmd)) return - elapsed = time.time() - t0 - print('xz-compressing %s with "%s"... DONE (%.2fs)' % (path, ' '.join(cmd), elapsed)) - os.rename(path + '.xz', path)