diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-02-07 15:58:30 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-02-07 16:12:37 -0500 |
commit | d082204096afd51730f44a75bd02423f74c2e5ae (patch) | |
tree | 208847840c2ce301cacfe323aa4e1b571f881343 /mesonbuild | |
parent | c6862744cb91e1fff0ed2f18a1bb353e3292df28 (diff) | |
download | meson-d082204096afd51730f44a75bd02423f74c2e5ae.zip meson-d082204096afd51730f44a75bd02423f74c2e5ae.tar.gz meson-d082204096afd51730f44a75bd02423f74c2e5ae.tar.bz2 |
mdist: fix dist scripts in subprojects being marked as superproject scripts
This has never worked for built/found programs, only for script files.
In commit 2fabd4c7dc22373e99fc63823d80083ad30704b8 scripts learned an
attribute stating which subproject they came from. In commit
3990754bf55727ef5593769b48f0a03c6b7a3671 dist scripts learned to run
even from a subproject, and relied on that attribute to know when, in
fact, they came from a subproject.
Unfortunately the original attribute was only set in one half of an
if/else, and the other half returned early with only part of the work
done.
Fixes #9964
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/interpreter/mesonmain.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py index 74b5978..5781e03 100644 --- a/mesonbuild/interpreter/mesonmain.py +++ b/mesonbuild/interpreter/mesonmain.py @@ -87,13 +87,13 @@ class MesonMain(MesonInterpreterObject): FeatureNew.single_use(f'Passing executable/found program object to script parameter of {name}', '0.55.0', self.subproject, location=self.current_node) largs.append(prog) - largs.extend(args) - return self.interpreter.backend.get_executable_serialisation(largs) - elif isinstance(prog, mesonlib.File): - FeatureNew.single_use(f'Passing file object to script parameter of {name}', - '0.57.0', self.subproject, location=self.current_node) - found = self.interpreter.find_program_impl([prog]) - largs.append(found) + else: + if isinstance(prog, mesonlib.File): + FeatureNew.single_use(f'Passing file object to script parameter of {name}', + '0.57.0', self.subproject, location=self.current_node) + found = self.interpreter.find_program_impl([prog]) + largs.append(found) + largs.extend(args) es = self.interpreter.backend.get_executable_serialisation(largs) es.subproject = self.interpreter.subproject |