mdist: don't mutate meson_command, which is supposed to be immutable

pull/13596/head
Dylan Baker 3 months ago committed by Jussi Pakkanen
parent 45db23394f
commit 49cc4862e7
  1. 5
      mesonbuild/mdist.py

@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2017 The Meson development team
# Copyright © 2023 Intel Corporation
# Copyright © 2023-2024 Intel Corporation
from __future__ import annotations
@ -289,7 +289,7 @@ def run_dist_steps(meson_command: T.List[str], unpacked_src_dir: str, builddir:
return 1
return 0
def check_dist(packagename: str, meson_command: ImmutableListProtocol[str], extra_meson_args: T.List[str], bld_root: str, privdir: str) -> int:
def check_dist(packagename: str, _meson_command: ImmutableListProtocol[str], extra_meson_args: T.List[str], bld_root: str, privdir: str) -> int:
print(f'Testing distribution package {packagename}')
unpackdir = os.path.join(privdir, 'dist-unpack')
builddir = os.path.join(privdir, 'dist-build')
@ -303,6 +303,7 @@ def check_dist(packagename: str, meson_command: ImmutableListProtocol[str], extr
unpacked_files = glob(os.path.join(unpackdir, '*'))
assert len(unpacked_files) == 1
unpacked_src_dir = unpacked_files[0]
meson_command = _meson_command.copy()
meson_command += ['setup']
meson_command += create_cmdline_args(bld_root)
meson_command += extra_meson_args

Loading…
Cancel
Save