[PATCH v3 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jul 9, 2025, 06:23 UTC
- Message-ID
- <20250709-b4-pks-meson-cleanups-v3-6-29ab15b9ab85@pks.im>
- In-Reply-To
- <20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im>
In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH, 2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases. It was reported [1] though that this causes a new issue when overriding libexecdir with `-Dlibexecdir=`:
$ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different
$ meson install
$ /tmp/git/bin/git --exec-path
/tmp/git/libexec-different
$ /tmp/git/bin/git daemon
git: 'daemon' is not a git command. See 'git --help'.While we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we forgot to append 'git-core'. Consequently, it cannot find its binaries anymore.
Fix this issue by appending 'git-core' to libexecdir. With this, things work as expected:
$ meson install
$ /tmp/git/bin/git --exec-path
/tmp/git/libexec-different/git-core
$ /tmp/git/bin/git daemon -h
...[1]: <66fd343a-1351-4350-83eb-c797e47b7693@gmail.com>
Reported-by: irecca.kun@gmail.com Based-on-patch-by: irecca.kun@gmail.com Signed-off-by: Patrick Steinhardt <ps@pks.im> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build index 02d73188537..ffb1bb61d4a 100644 --- a/meson.build +++ b/meson.build @@ -1599,7 +1599,7 @@ endif git_exec_path = 'libexec/git-core' libexec = get_option('libexecdir') if libexec != 'libexec' and libexec != '.' - git_exec_path = libexec + git_exec_path = libexec / 'git-core' endif if get_option('runtime_prefix')
-- 2.50.1.327.g047016eb4a.dirty