* [PATCH] bitbake: fetch2/git: Allow HEAD to be searched.
@ 2015-04-23 18:20 Mariano Lopez
0 siblings, 0 replies; 3+ messages in thread
From: Mariano Lopez @ 2015-04-23 18:20 UTC (permalink / raw)
To: bitbake-devel
This makes it possble to fetch/search HEAD. This is useful when
searching for HEAD doing the sanity check.
[YOCTO #7592]
Signed-off-by: mlopezva <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]
--
1.8.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] bitbake: fetch2/git: Allow HEAD to be searched.
@ 2015-04-27 16:16 Mariano Lopez
2015-04-28 16:47 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Mariano Lopez @ 2015-04-27 16:16 UTC (permalink / raw)
To: bitbake-devel
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]
--
1.8.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bitbake: fetch2/git: Allow HEAD to be searched.
2015-04-27 16:16 [PATCH] bitbake: fetch2/git: Allow HEAD to be searched Mariano Lopez
@ 2015-04-28 16:47 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2015-04-28 16:47 UTC (permalink / raw)
To: Mariano Lopez; +Cc: bitbake-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-28 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 16:16 [PATCH] bitbake: fetch2/git: Allow HEAD to be searched Mariano Lopez
2015-04-28 16:47 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2015-04-23 18:20 Mariano Lopez
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.