diff options
Diffstat (limited to 'bin/update/create_full_mar.py')
-rwxr-xr-x | bin/update/create_full_mar.py | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py index b4f53c48f1..1c5714e69b 100755 --- a/bin/update/create_full_mar.py +++ b/bin/update/create_full_mar.py @@ -3,7 +3,6 @@ import sys import glob import os -import re import subprocess import json import argparse @@ -38,35 +37,20 @@ def main(): target_dir = update_path.get_update_dir() temp_dir = update_path.get_current_build_dir() - tar_file_glob = os.path.join(update_path.get_workdir(), "installation", product_name, "archive", "install", "*", f'{product_name}_*_archive*') - tar_files = glob.glob(tar_file_glob) - if len(tar_files) != 1: - raise Exception(f'`{tar_file_glob}` does not match exactly one file') - tar_file = tar_files[0] + msi_file_glob = os.path.join(update_path.get_workdir(), "installation", product_name, "msi", "install", "*", f'{product_name}_*.msi') + msi_files = glob.glob(msi_file_glob) + if len(msi_files) != 1: + raise Exception(f'`{msi_file_glob}` does not match exactly one file') + msi_file = msi_files[0] - uncompress_dir = uncompress_file_to_dir(tar_file, temp_dir) - - metadatafile = os.path.join( - update_path.get_workdir(), 'installation', product_name, 'archive', 'install', 'metadata') - ifsfile = os.path.join(update_path.get_mar_dir(), 'ifs') - with open(metadatafile) as meta, open(ifsfile, 'w') as ifs: - for l in meta: - m = re.fullmatch('(skip|cond) (.*)', l.rstrip()) - if m and m.group(2).startswith(f'{product_name}/'): - path = m.group(2)[len(f'{product_name}/'):] - if m.group(1) == 'skip': - os.remove(os.path.join(uncompress_dir, path)) - else: - ifs.write(f'"{path}" "{path}"\n') + uncompress_dir = uncompress_file_to_dir(msi_file, temp_dir) mar_file = make_complete_mar_name(target_dir, filename_prefix) path = os.path.join( workdir, 'UnpackedTarball/onlineupdate/tools/update-packaging/make_full_update.sh') os.putenv('MOZ_PRODUCT_VERSION', version) os.putenv('MAR_CHANNEL_ID', 'LOOnlineUpdater') - subprocess.call([ - path, convert_to_native(mar_file), convert_to_native(uncompress_dir), - convert_to_native(ifsfile)]) + subprocess.call([path, convert_to_native(mar_file), convert_to_native(uncompress_dir)]) sign_mar_file(target_dir, certificate_path, certificate_name, mar_file, filename_prefix) |