diff options
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2021-01-13 23:10:14 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2021-01-18 21:08:54 +0100
commit08260e5ed3a9161b8d2a151c6471ba613865d8aa (patch)
parent1553422c8f74d163af334485a38dd92737495311 (diff)
pkg-generic: host variant use git submodules if target variant does
When a package has both a target and a host variant, and uses git submodules, and the host variant is downloaded before the target one, we end up with the generated archive missing the submodules. This happens in exactly one package in our tree: c-capnproto. This issue was not caught before because after a few days, the full sources are added to sources.buildroot.net. So when the hash check fails, the full tarball is simply downloaded from there. Propagate the git submodule setting from the target variant to the host variant, unless the host variant explicitly opted-out. Fixes: http://autobuild.buildroot.org/results/2de9c6c8ce83569d18cc7140ebc60d6fe1aadcbf/ Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commit 4d03923b6a7776d30ee2a7452640d79442cfa2f0) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
1 files changed, 6 insertions, 0 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 7679c41556..81f0b79990 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -581,6 +581,12 @@ ifneq ($$(filter bzr cvs hg svn,$$($(2)_SITE_METHOD)),)
+ifndef $(2)_GIT_SUBMODULES
+ ifdef $(3)_GIT_SUBMODULES
+ endif
# Do not accept to download git submodule if not using the git method
ifneq ($$($(2)_GIT_SUBMODULES),)
ifneq ($$($(2)_SITE_METHOD),git)