diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-02-16 12:15:56 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-05-20 13:31:05 +0300 |
commit | 6f4973abad9eec9fcc915117f1c3d1a93ccc948c (patch) | |
tree | 83ac7c21fc2573b11a7eff4cf87f923829cd9adf | |
parent | d5ae94f571af17ec969a4320b54e322f77d6e725 (diff) | |
download | meson-6f4973abad9eec9fcc915117f1c3d1a93ccc948c.zip meson-6f4973abad9eec9fcc915117f1c3d1a93ccc948c.tar.gz meson-6f4973abad9eec9fcc915117f1c3d1a93ccc948c.tar.bz2 |
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.
-rw-r--r-- | mesonbuild/wrap/wrap.py | 2 |
1 files changed, 2 insertions, 0 deletions
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': |