Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Makefile.package.in: GIT: add support to fetch git submodules
Date: Tue, 28 Feb 2012 22:32:28 +0000	[thread overview]
Message-ID: <201202282232.28362.arnout@mind.be> (raw)
In-Reply-To: <1330435519-21011-1-git-send-email-aletes.xgr@gmail.com>

On Tuesday 28 February 2012 13:25:19 Alexandre Pereira da Silva wrote:
> Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
> ---
>  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

  reply	other threads:[~2012-02-28 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 13:25 [Buildroot] [PATCH] Makefile.package.in: GIT: add support to fetch git submodules Alexandre Pereira da Silva
2012-02-28 22:32 ` Arnout Vandecappelle [this message]
2012-02-28 23:54   ` Alexandre Pereira da Silva
2012-07-30 15:16     ` Frank Hunleth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201202282232.28362.arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox