diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-07 23:06:22 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-29 18:23:03 -0400 |
| commit | de2c091ba6385af05b9556acd4daa06af9216ca3 (patch) | |
| tree | 2c74622b4c7d9a3c41b525841387c6c9db5560de | |
| parent | 34da721ec2ad96d35a829f5e977ec253e82b9d91 (diff) | |
| download | meson-de2c091ba6385af05b9556acd4daa06af9216ca3.tar.gz | |
i18n: fix bug where disabling gettext() broke merge_file()
In the former case, the presence of tools is optional, but triggers a
warning and then no-ops the target. In the latter case, the presence of
the tools is mandatory. But if it was already looked up and discovered
to be missing, we did not actually check that it is found before trying
to use it.
In the case that it isn't found, check again, so that we explicitly
error out with a relevant error message due to setting the required
flag.
Fixes #10320
| -rw-r--r-- | mesonbuild/modules/i18n.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 4bbc69abf..151fd08a0 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -166,7 +166,7 @@ class I18nModule(ExtensionModule): KwargInfo('type', str, default='xml', validator=in_set_validator({'xml', 'desktop'})), ) def merge_file(self, state: 'ModuleState', args: T.List['TYPE_var'], kwargs: 'MergeFile') -> ModuleReturnValue: - if self.tools['msgfmt'] is None: + if self.tools['msgfmt'] is None or not self.tools['msgfmt'].found(): self.tools['msgfmt'] = state.find_program('msgfmt', for_machine=mesonlib.MachineChoice.BUILD) podir = path.join(state.build_to_src, state.subdir, kwargs['po_dir']) |
