[openwrt/openwrt] prereq-build: add additional git detection

LEDE Commits lede-commits at lists.infradead.org
Mon Jun 27 13:35:50 PDT 2022


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/7e223a89a17e122f2dfad246e5e5ada8f1793dd7

commit 7e223a89a17e122f2dfad246e5e5ada8f1793dd7
Author: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Jun 9 14:13:09 2022 +0200

    prereq-build: add additional git detection
    
    With some OS (Guix) the git submodule command is wrapped in
    a script. Current logic parse the git submodule script directly.
    If it's wrapped the prereq check wrongly fails while 'git submodule
    --recursive' is actually available.
    Add an additional check that try to directly use the 'git submodule'
    command to check if the prereq is satisfied.
    
    Fixes: #9986
    Reported-by: Attila Lendvai <attila at lendvai.name>
    Suggested-by: Attila Lendvai <attila at lendvai.name>
    Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit ab1f3a87063b94f485bd582f32a066b80007bac9)
---
 include/prereq-build.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index e1918f0027..4a8c2b063a 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -177,7 +177,8 @@ $(eval $(call TestHostCommand,python3-distutils, \
 	$(STAGING_DIR_HOST)/bin/python3 -c 'import distutils'))
 
 $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
-	git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
+	git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
+	git submodule --help | grep -- --recursive))
 
 $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
 	file --version 2>&1 | grep file))




More information about the lede-commits mailing list