]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
externalsrc: fix lookup for .gitmodules
authorPeter Marko <peter.marko@siemens.com>
Thu, 1 Dec 2022 14:04:40 +0000 (15:04 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Dec 2022 10:48:32 +0000 (10:48 +0000)
commit66ff3d1f65cd2e7f5319e98fa41f47a59b714c72
tree959c8cf49ddab4843fc9775562d4d353022b32dd
parentc5b4d3f621bc790c8b6a6a41c73bb2efad5fab5d
externalsrc: fix lookup for .gitmodules

Commit 0533edac277080e1bd130c14df0cbac61ba01a0c broke
bitbake parsing when bitbake is executed from directory with existing .gitmodules
and the recipe in externalsrc does not have .gitmodules

The check needs to search for .gitmodules in sources path, not cwd.

iParsing recipes...ERROR: ExpansionError during parsing <path to recipe>
...
bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception CalledProcessError: Command '['git', 'config', '--file', '.gitmodules', '--get-regexp', 'path']' returned non-zero exit status 1.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes/externalsrc.bbclass