From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnout Vandecappelle Date: Tue, 28 Feb 2012 22:32:28 +0000 Subject: [Buildroot] [PATCH] Makefile.package.in: GIT: add support to fetch git submodules In-Reply-To: <1330435519-21011-1-git-send-email-aletes.xgr@gmail.com> References: <1330435519-21011-1-git-send-email-aletes.xgr@gmail.com> Message-ID: <201202282232.28362.arnout@mind.be> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On Tuesday 28 February 2012 13:25:19 Alexandre Pereira da Silva wrote: > Signed-off-by: Alexandre Pereira da Silva > --- > package/Makefile.package.in | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/package/Makefile.package.in b/package/Makefile.package.in > index ea44c6c..863e866 100644 > --- a/package/Makefile.package.in > +++ b/package/Makefile.package.in > @@ -147,13 +147,15 @@ domainseparator=$(if $(1),$(1),/) > define DOWNLOAD_GIT > test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ > (pushd $(DL_DIR) > /dev/null && \ > - $(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \ > + $(GIT) clone -n $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \ > pushd $($(PKG)_BASE_NAME) > /dev/null && \ > - $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \ > - gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \ > + $(GIT) checkout $($(PKG)_VERSION) && \ > + $(GIT) submodule init && \ > + $(GIT) submodule update && \ > + $(TAR) czf $(DL_DIR)/$($(PKG)_SOURCE) . &&\ > popd > /dev/null && \ > rm -rf $($(PKG)_DL_DIR) && \ > - popd > /dev/null) > + popd > /dev/null) > endef > > # TODO: improve to check that the given PKG_DL_VERSION exists on the remote I'm a bit concerned with the impact this will have on performance, e.g. when cloning a linux git. Could you evaluate that? Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F