[PATCH] buildroot: improve git submodule handling for packages=0A=
Darik Horn
dajhorn at vanadac.com
Fri May 15 09:47:34 EDT 2015
=0A=
Move the `--recursive` switch from `git clone` to `git submodule`=0A=
so that submodules are cloned for upstream branches where the=0A=
PKG_SOURCE_VERSION commit-ish has a different .gitmodules=0A=
configuration than the repository default.=0A=
=0A=
This is, for example, required when the master branch for a source=0A=
package does not use submodules, but its topic branch for OpenWRT=0A=
does.=0A=
=0A=
This changes the buildroot dependency from git-1.6.2 to git 1.7.12.2,=0A=
which was released September 2012.=0A=
=0A=
Signed-off-by: Darik Horn <dajhorn at vanadac.com>=0A=
---=0A=
include/download.mk | 5 +++--=0A=
include/prereq-build.mk | 4 ++--=0A=
2 files changed, 5 insertions(+), 4 deletions(-)=0A=
=0A=
diff --git a/include/download.mk b/include/download.mk=0A=
index adaa2e6..d593344 100644=0A=
--- a/include/download.mk=0A=
+++ b/include/download.mk=0A=
@@ -88,8 +88,9 @@ define DownloadMethod/git=0A=
cd $(TMP_DIR)/dl && \=0A=
rm -rf $(SUBDIR) && \=0A=
[ \! -d $(SUBDIR) ] && \=0A=
- git clone $(URL) $(SUBDIR) --recursive && \=0A=
- (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \=0A=
+ git clone $(URL) $(SUBDIR) && \=0A=
+ (cd $(SUBDIR) && git checkout $(VERSION) && \=0A=
+ git submodule update --init --recursive) && \=0A=
echo "Packing checkout..." && \=0A=
rm -rf $(SUBDIR)/.git && \=0A=
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \=0A=
diff --git a/include/prereq-build.mk b/include/prereq-build.mk=0A=
index 211201a..c06adaf 100644=0A=
--- a/include/prereq-build.mk=0A=
+++ b/include/prereq-build.mk=0A=
@@ -144,8 +144,8 @@ $(eval $(call SetupHostCommand,python,Please install =
Python 2.x, \=0A=
$(eval $(call SetupHostCommand,svn,Please install the Subversion =
client, \=0A=
svn --version | grep Subversion))=0A=
=0A=
-$(eval $(call SetupHostCommand,git,Please install Git (git-core) >=3D =
1.6.5, \=0A=
- git clone 2>&1 | grep -- --recursive))=0A=
+$(eval $(call SetupHostCommand,git,Please install Git (git-core) >=3D =
1.7.12.2, \=0A=
+ git submodule update --help 2>&1 | grep -- --recursive))=0A=
=0A=
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \=0A=
file --version 2>&1 | grep file))=0A=
-- =0A=
1.9.1=0A=
=0A=
------=_NextPart_000_009E_01D0C00C.10986DF0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
------=_NextPart_000_009E_01D0C00C.10986DF0--
More information about the openwrt-devel
mailing list