summaryrefslogtreecommitdiff
path: root/include/download.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-02-29 20:12:25 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-02-29 20:12:25 +0000
commit59121fdd69f04ae766069944d10eacb2a4286316 (patch)
tree239eb23737696992f0af4f5a3b7aa8b528c8a5be /include/download.mk
parent076d58d3440f382c536ea8874f58b0df23c263bc (diff)
downloadmtk-20170518-59121fdd69f04ae766069944d10eacb2a4286316.zip
mtk-20170518-59121fdd69f04ae766069944d10eacb2a4286316.tar.gz
mtk-20170518-59121fdd69f04ae766069944d10eacb2a4286316.tar.bz2
buildroot: improve git submodule handling for packages
Move the `--recursive` switch from `git clone` to `git submodule` so that submodules are cloned for upstream branches where the PKG_SOURCE_VERSION commit-ish has a different .gitmodules configuration than the repository default. This is, for example, required when the master branch for a source package does not use submodules, but its topic branch for OpenWRT does. This changes the buildroot dependency from git-1.6.2 to git 1.7.12.2, which was released September 2012. Signed-off-by: Darik Horn <dajhorn@vanadac.com> Signed-off-by: Karl Palsson <karlp@tweak.net.au> SVN-Revision: 48830
Diffstat (limited to 'include/download.mk')
-rw-r--r--include/download.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/download.mk b/include/download.mk
index 988542f..63af908 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -90,8 +90,9 @@ define DownloadMethod/git
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- git clone $(URL) $(SUBDIR) --recursive && \
- (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \
+ git clone $(URL) $(SUBDIR) && \
+ (cd $(SUBDIR) && git checkout $(VERSION) && \
+ git submodule update --init --recursive) && \
echo "Packing checkout..." && \
rm -rf $(SUBDIR)/.git && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \