From: Luca Boccassi Date: Wed, 6 Aug 2025 11:40:24 +0000 (+0100) Subject: meson: fix compatibility with Python 3.7 X-Git-Tag: v258-rc3~74^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2793d6acf063ae8fe506a1684e5a24ce83267e6d;p=thirdparty%2Fsystemd.git meson: fix compatibility with Python 3.7 [8/2759] Generating src/basic/filesystem-sets.c with a custom command (wrapped by meson to capture output) FAILED: src/basic/filesystem-sets.c /mnt/work/.local/bin/meson --internal exe --capture src/basic/filesystem-sets.c -- /mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py fs-type-to-string filesystem-sets fs-in-group --- stderr --- Traceback (most recent call last): File "/mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py", line 372, in generate_fs_in_group() File "/mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py", line 311, in generate_fs_in_group start=[]))) TypeError: sum() takes no keyword arguments --- diff --git a/src/basic/filesystem-sets.py b/src/basic/filesystem-sets.py index 6520f45b89e..7fc2b7a5152 100755 --- a/src/basic/filesystem-sets.py +++ b/src/basic/filesystem-sets.py @@ -307,8 +307,7 @@ def generate_fs_in_group(): print(' switch (fs_group) {') for name, _, *filesystems in FILESYSTEM_SETS: - magics = sorted(set(sum((NAME_TO_MAGIC[fs] for fs in filesystems), - start=[]))) + magics = sorted(set(sum((NAME_TO_MAGIC[fs] for fs in filesystems), []))) enum = 'FILESYSTEM_SET_' + name[1:].upper().replace('-', '_') print(f' case {enum}:') opts = '\n || '.join(f'F_TYPE_EQUAL(st->f_type, {magic})' @@ -355,7 +354,7 @@ def magic_defines(): def check(): kernel_magics = set(magic_defines()) - our_magics = set(sum(NAME_TO_MAGIC.values(), start=[])) + our_magics = set(sum(NAME_TO_MAGIC.values(), [])) extra = kernel_magics - our_magics if extra: sys.exit(f"kernel knows additional filesystem magics: {', '.join(sorted(extra))}")