Fix xz failing to allocate memory when used in a 32-bit container
This commit is contained in:
parent
81061a8d43
commit
eb2c726eb2
1 changed files with 2 additions and 1 deletions
|
|
@ -216,7 +216,8 @@ def create_tarfile(env, compression_level='9'):
|
|||
print('Compressing archive...')
|
||||
ans = f'{dist.rpartition(".")[0]}.txz'
|
||||
start_time = time.time()
|
||||
subprocess.check_call(['xz', '--verbose', '--threads=0', '-f', f'-{compression_level}', dist])
|
||||
threads = 4 if arch == 'i686' else 0
|
||||
subprocess.check_call(['xz', '--verbose', f'--threads={threads}', '-f', f'-{compression_level}', dist])
|
||||
secs = time.time() - start_time
|
||||
print('Compressed in {} minutes {} seconds'.format(secs // 60, secs % 60))
|
||||
os.rename(f'{dist}.xz', ans)
|
||||
|
|
|
|||
Loading…
Reference in a new issue