diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-10 11:14:28 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-01-11 13:19:38 +0100 |
commit | b3db20897c7ef380b43ca412865060347b666fc5 (patch) | |
tree | 46a892da5e2b56d34ffdab339c407e2164618f46 | |
parent | 3ab08b58cbac8be8bbd5d5a409b54e488b0e2c73 (diff) |
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.bergmann@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.stahl@allotropia.de>
-rwxr-xr-x | bin/update/create_full_mar.py | 8 |
1 files changed, 6 insertions, 2 deletions
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) |