]> 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>
Fri, 6 Jan 2023 17:31:37 +0000 (17:31 +0000)
commitc58d82b98348b167b60ec3c8b9651d73b1bdfbdc
tree05c1cce8678f226db7f1e071b46b0fe96952cefd
parentaab8d528ceeb2ee1ab7cffdeff4007fd66275f1b
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>
(cherry picked from commit 66ff3d1f65cd2e7f5319e98fa41f47a59b714c72)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/externalsrc.bbclass