diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-11 15:01:15 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-03-12 00:31:12 +0200 |
commit | 5cb9f2b066a8dc8a89a49186b359842664d33534 (patch) | |
tree | a89b1bc8e8e055efd5611bad4a7257ebdc201954 /test cases/common | |
parent | 44104e820aaecc94b9da878fbc9dea43382f9d3e (diff) | |
download | meson-5cb9f2b066a8dc8a89a49186b359842664d33534.zip meson-5cb9f2b066a8dc8a89a49186b359842664d33534.tar.gz meson-5cb9f2b066a8dc8a89a49186b359842664d33534.tar.bz2 |
fix regression in vcs_tag when the VCS program is not installed
We are supposed to fallback on the fallback when running the vcstagger,
but instead we errored out during configure.
Fixes regression in commit b402817fb6f0392812bfa272bdbc05c9c30139fa.
Before this, we used shutil.which || relative paths, and in the latter
case if it could not be found we still wrote out that path but it failed
to run in vcstagger. Now, we use find_program under the hood, so it
needs to be run in non-fatal mode, and if it is not found, we simply
keep the original command string. It's a VCS command, so if we magically
end up finding it at runtime because it was installed after running
configure, that is *fine*.
Diffstat (limited to 'test cases/common')
-rw-r--r-- | test cases/common/66 vcstag/meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/common/66 vcstag/meson.build b/test cases/common/66 vcstag/meson.build index 256d2e9..520f72a 100644 --- a/test cases/common/66 vcstag/meson.build +++ b/test cases/common/66 vcstag/meson.build @@ -9,9 +9,15 @@ output : 'vcstag-custom.c', command : ['git', 'show-ref', '-s', 'refs/heads/master'], fallback : '1.0.0') +version_src_notfound_fallback = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag-notfound-fallback.c', +command : ['git-but-not-found-sorry', 'show-ref', '-s', 'refs/heads/master'], +fallback : '1.0.0') + version_src_fallback = vcs_tag(input : 'vcstag.c.in', output : 'vcstag-fallback.c') executable('tagprog', 'tagprog.c', version_src) executable('tagprog-custom', 'tagprog.c', version_src_custom) executable('tagprog-fallback', 'tagprog.c', version_src_fallback) +executable('tagprog-notfound-fallback', 'tagprog.c', version_src_notfound_fallback) |