From 6f4973abad9eec9fcc915117f1c3d1a93ccc948c Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 16 Feb 2023 12:15:56 -0500 Subject: wrap: Check for common "provides" typo It is a common mistake that is hard to find because Meson silently ignore unknown sections. Better have an explicit error message. --- mesonbuild/wrap/wrap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index b63d7a4..06335ce 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -224,6 +224,8 @@ class PackageDefinition: self.diff_files.append(path) def parse_provide_section(self, config: configparser.ConfigParser) -> None: + if config.has_section('provides'): + raise WrapException('Unexpected "[provides]" section, did you mean "[provide]"?') if config.has_section('provide'): for k, v in config['provide'].items(): if k == 'dependency_names': -- cgit v1.1