mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
meson: Copy files with git only in true git repository
When mkosi is run from git-worktree(1), the .git is not a repository directory but a textfile pointing to the real git dir (e.g. /home/user/systemd/.git/worktrees/systemd-worktree). This git dir is not bind mounted into build environment and it fails with: > fatal: not a git repository: /home/user/systemd/.git/worktrees/systemd-worktree > test/meson.build:190:16: ERROR: Command `/usr/bin/env -u GIT_WORK_TREE /usr/bin/git --git-dir=/root/src/.git ls-files ':/test/dmidecode-dumps/*.bin'` failed with status 128. There is already a fallback to use shell globbing instead of ls-files, use it with git worktrees as well.
This commit is contained in:
committed by
Luca Boccassi
parent
7a67afe331
commit
edd84b8e4b
@@ -50,7 +50,7 @@ sanitize_address_undefined = custom_target(
|
||||
fuzz_sanitizers = [['address,undefined', sanitize_address_undefined]]
|
||||
fuzz_testsdir = 'test/fuzz'
|
||||
|
||||
if git.found() and fs.exists(project_source_root / '.git')
|
||||
if git.found() and fs.is_dir(project_source_root / '.git')
|
||||
out = run_command(env, '-u', 'GIT_WORK_TREE',
|
||||
git, '--git-dir=@0@/.git'.format(project_source_root),
|
||||
'ls-files', ':/@0@/*/*'.format(fuzz_testsdir),
|
||||
|
||||
Reference in New Issue
Block a user