From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] pkg-download: take some more care of <PKG_>VERSION when METHOD is git
Date: Thu, 04 Apr 2013 13:41:06 +0200 [thread overview]
Message-ID: <515D66D2.5050204@mind.be> (raw)
In-Reply-To: <1364566078-29535-2-git-send-email-Patrick.Boettcher@parrot.com>
On 29/03/13 15:07, Patrick Boettcher wrote:
> If a package's SITE_METHOD is set to git, but the VERSION is not set
> it fails to create a tar-ball, this patch is fixes this by always using
> HEAD as git-archive reference.
>
> HEAD will work in both cases:
> 1) if VERSION is set the clone's HEAD is VERSION,
> 2) if VERSION is not set the clone's HEAD is the default branch.
This doesn't work if the version is an unnamed sha1. In that case, a
full clone will be done so HEAD does not point to the requested version.
A better solution is probably to have <PKG>_VERSION default to HEAD if
the site-method is one of the revision control systems.
Regards,
Arnout
>
> Signed-off-by: Patrick Boettcher <Patrick.Boettcher@parrot.com>
> ---
> package/pkg-download.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/pkg-download.mk b/package/pkg-download.mk
> index 1705fcd..d21605a 100644
> --- a/package/pkg-download.mk
> +++ b/package/pkg-download.mk
> @@ -88,7 +88,7 @@ define DOWNLOAD_GIT
> (echo "Doing full clone" && \
> $(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME))) && \
> pushd $($(PKG)_BASE_NAME) > /dev/null && \
> - $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
> + $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ HEAD | \
> gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
> popd > /dev/null && \
> rm -rf $($(PKG)_DL_DIR) && \
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
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
next prev parent reply other threads:[~2013-04-04 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 14:07 [Buildroot] [PATCH] pkg-download with git and not VERSION set in package Patrick Boettcher
2013-03-29 14:07 ` [Buildroot] [PATCH] pkg-download: take some more care of <PKG_>VERSION when METHOD is git Patrick Boettcher
2013-04-04 11:41 ` Arnout Vandecappelle [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-04-02 19:40 [Buildroot] [PATCH v2] pkg-download: take some more care of <PKG_>VERSION with git Patrick Boettcher
2013-04-02 19:40 ` [Buildroot] [PATCH] pkg-download: take some more care of <PKG_>VERSION when METHOD is git Patrick Boettcher
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=515D66D2.5050204@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.