From 88013815633759fd499bde9e0173aaf9024604b1 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Tue, 2 Mar 2021 16:04:21 -0600 Subject: Fix duplicate pkg_config_path entries Previously builds would *potentially* get sammed with messaging at configure time that duplicate entries in an array would be an error in the future, and the cause was because the same entries were getting added over and over to pkg_config_path.p --- mesonbuild/dependencies/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/dependencies/base.py') diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 4410b67..0814218 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -669,8 +669,8 @@ class PkgConfigDependency(ExternalDependency): @staticmethod def setup_env(env: T.MutableMapping[str, str], environment: 'Environment', for_machine: MachineChoice, extra_path: T.Optional[str] = None) -> None: - extra_paths: T.List[str] = environment.coredata.options[OptionKey('pkg_config_path', machine=for_machine)].value - if extra_path: + extra_paths: T.List[str] = environment.coredata.options[OptionKey('pkg_config_path', machine=for_machine)].value[:] + if extra_path and extra_path not in extra_paths: extra_paths.append(extra_path) sysroot = environment.properties[for_machine].get_sys_root() if sysroot: -- cgit v1.1