diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-27 11:49:55 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-31 22:52:31 -0400 |
commit | fdcc5665904cc702db7a2e36de56b3f5eb29db7d (patch) | |
tree | 866156fd3e719628ea159b1a126173c26c7373db /mesonbuild | |
parent | 8ae2bf5a9e652d49027191709cda5353446af487 (diff) | |
download | meson-fdcc5665904cc702db7a2e36de56b3f5eb29db7d.zip meson-fdcc5665904cc702db7a2e36de56b3f5eb29db7d.tar.gz meson-fdcc5665904cc702db7a2e36de56b3f5eb29db7d.tar.bz2 |
i18n: don't let our maintainer targets run via wrapped env
They are RunTargets because they are one-shot commands without outputs.
But we implement them purely via our internal wrapper for gettext, so
there is no reason to wrap them *again* in our internal wrapper for
meson_exe and set a bunch of environment variables we know we absolutely
do not need, use, or want.
This avoids the ugly "wrapped due to env" status, and allows users to
directly see the command being run without going into despair at obscure
pickled nonsense.
It also offers a tiny defense against upgrading Meson without
reconfiguring. People should not do that, and we error out about this in
a bunch of places, but `--internal gettext` has a perfectly stable
interface just like most build tools that aren't part of Meson
internals, since it uses command line arguments instead of pickling.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/modules/i18n.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index d388d3f..2bdf9d3 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -257,7 +257,7 @@ class I18nModule(ExtensionModule): potargs.append(extra_arg) potargs.append('--xgettext=' + self.tools['xgettext'].get_path()) pottarget = build.RunTarget(packagename + '-pot', potargs, [], state.subdir, state.subproject, - state.environment) + state.environment, default_env=False) targets.append(pottarget) install = kwargs['install'] @@ -301,7 +301,7 @@ class I18nModule(ExtensionModule): for tool in ['msginit', 'msgmerge']: updatepoargs.append(f'--{tool}=' + self.tools[tool].get_path()) updatepotarget = build.RunTarget(packagename + '-update-po', updatepoargs, [], state.subdir, state.subproject, - state.environment) + state.environment, default_env=False) targets.append(updatepotarget) return ModuleReturnValue([gmotargets, pottarget, updatepotarget], targets) |