bin/update/create_full_mar.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit b3db20897c7ef380b43ca412865060347b666fc5 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Wed Jan 10 11:14:28 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Jan 11 13:19:38 2024 +0100 Adapt create-update-info to --with-lang ...where, depending on --without-lang/--with-lang=fu ba bz/--with-lang=ALL, the directory and archive file names appear to vary wildly, so go with a glob approach instead of trying to guess the exact matching names here Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161885 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> (cherry picked from commit f2517c7117c94a6b02c9b911691f2751520b150c) Conflicts: bin/update/create_full_mar.py Change-Id: I07355724f28eea66e619eb8d3d83c3e74217f54f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161856 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py index 65e25e2807e1..96bc9a5d895c 100755 --- a/bin/update/create_full_mar.py +++ b/bin/update/create_full_mar.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +import glob import os import subprocess import json @@ -36,8 +37,11 @@ def main(): target_dir = update_path.get_update_dir() temp_dir = update_path.get_current_build_dir() - tar_dir = os.path.join(update_path.get_workdir(), "installation", product_name, "archive", "install", "en-US") - tar_file = os.path.join(tar_dir, os.listdir(tar_dir)[0]) + 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] uncompress_dir = uncompress_file_to_dir(tar_file, temp_dir)