aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2021-03-02 16:04:21 -0600
committerXavier Claessens <xclaesse@gmail.com>2021-03-12 12:32:41 -0500
commit88013815633759fd499bde9e0173aaf9024604b1 (patch)
tree3f8d1739b5e6d408a485634cb19aded575972d64 /mesonbuild/dependencies/base.py
parenta1c8376f42c7cb6b97bd078fd9a3595258abd447 (diff)
downloadmeson-88013815633759fd499bde9e0173aaf9024604b1.zip
meson-88013815633759fd499bde9e0173aaf9024604b1.tar.gz
meson-88013815633759fd499bde9e0173aaf9024604b1.tar.bz2
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
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py4
1 files changed, 2 insertions, 2 deletions
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: