Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Mariano Lopez <mariano.lopez@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] bitbake: fetch2/git: Allow HEAD to be searched.
Date: Tue, 28 Apr 2015 17:47:54 +0100	[thread overview]
Message-ID: <1430239674.13022.241.camel@linuxfoundation.org> (raw)
In-Reply-To: <553E60F0.5050908@linux.intel.com>

On Mon, 2015-04-27 at 11:16 -0500, Mariano Lopez wrote:
> This makes it possble to fetch/search HEAD. This is useful when 
> searching for HEAD doing the sanity check.
> 
> Please disregard previous patch with the same topic.
> 
> [YOCTO #7592]
> 
> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
> ---
>   bitbake/lib/bb/fetch2/git.py | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> index 0d91431..12fb6a2 100644
> --- a/bitbake/lib/bb/fetch2/git.py
> +++ b/bitbake/lib/bb/fetch2/git.py
> @@ -345,6 +345,9 @@ class Git(FetchMethod):
>           if ud.unresolvedrev[name][:5] == "refs/":
>               head = ud.unresolvedrev[name]
>               tag = ud.unresolvedrev[name]
> +        elif ud.unresolvedrev[name] == "HEAD":
> +            head = ud.unresolvedrev[name]
> +            tag = ud.unresolvedrev[name]
>           else:
>               head = "refs/heads/%s" % ud.unresolvedrev[name]
>               tag = "refs/tags/%s" % ud.unresolvedrev[name]

Looking at the bug, I think the example in poky.conf needs fixing not to
use HEAD rather than this patch.

I'd also mention that you could do:

if ud.unresolvedrev[name][:5] == "refs/" or  ud.unresolvedrev[name] == "HEAD":

rather than duplicate code. The whitespace in this patch is also broken.

Cheers,

Richard



  reply	other threads:[~2015-04-28 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 16:16 [PATCH] bitbake: fetch2/git: Allow HEAD to be searched Mariano Lopez
2015-04-28 16:47 ` Richard Purdie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-04-23 18:20 Mariano Lopez

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=1430239674.13022.241.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=mariano.lopez@linux.intel.com \
    /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