All of lore.kernel.org
 help / color / mirror / Atom feed
* [dora] [PATCH 0/1] bitbake: fetch2/git: Anchor names when using ls-remote
@ 2014-03-26  9:27 Robert Yang
  2014-03-26  9:27 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2014-03-26  9:27 UTC (permalink / raw)
  To: bitbake-devel

The following changes since commit b9d99235585f9d62bb6937f5342606b5f5a4b58f:

  image_types.bbclass: use 4096 instead of 8192 bytes-per-inode (2014-03-25 22:55:15 -0400)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib robert/dora-next
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/dora-next

Richard Purdie (1):
  bitbake: fetch2/git: Anchor names when using ls-remote

 bitbake/lib/bb/fetch2/git.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] bitbake: fetch2/git: Anchor names when using ls-remote
  2014-03-26  9:27 [dora] [PATCH 0/1] bitbake: fetch2/git: Anchor names when using ls-remote Robert Yang
@ 2014-03-26  9:27 ` Robert Yang
  2014-03-26 10:04   ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2014-03-26  9:27 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

When specifying tags, they're searched for unanchored so foo/bar could
match:

refs/heads/abc/foo/bar
refs/heads/xyz/foo/bar
refs/heads/foo/bar

This change anchors the expressions so they are based against heads
or tags (or any other base level tree that has been created).

(Bitbake master rev: df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Conflicts:
	bitbake/lib/bb/fetch2/git.py
	(ud.basecmd and basecmd conflicts, keep using basecmd)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/git.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 6175e4c..cff5ce1 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -305,8 +305,8 @@ class Git(FetchMethod):
             username = ""
 
         basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
-        cmd = "%s ls-remote %s://%s%s%s %s" % \
-              (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
+        cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \
+              (basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name], ud.unresolvedrev[name])
         if ud.proto.lower() != 'file':
             bb.fetch2.check_network_access(d, cmd)
         output = runfetchcmd(cmd, d, True)
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] bitbake: fetch2/git: Anchor names when using ls-remote
  2014-03-26  9:27 ` [PATCH 1/1] " Robert Yang
@ 2014-03-26 10:04   ` Richard Purdie
  2014-03-27  3:25     ` Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2014-03-26 10:04 UTC (permalink / raw)
  To: Robert Yang; +Cc: bitbake-devel

On Wed, 2014-03-26 at 05:27 -0400, Robert Yang wrote:
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> When specifying tags, they're searched for unanchored so foo/bar could
> match:
> 
> refs/heads/abc/foo/bar
> refs/heads/xyz/foo/bar
> refs/heads/foo/bar
> 
> This change anchors the expressions so they are based against heads
> or tags (or any other base level tree that has been created).
> 
> (Bitbake master rev: df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4)
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Conflicts:
> 	bitbake/lib/bb/fetch2/git.py
> 	(ud.basecmd and basecmd conflicts, keep using basecmd)
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  bitbake/lib/bb/fetch2/git.py |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> index 6175e4c..cff5ce1 100644
> --- a/bitbake/lib/bb/fetch2/git.py
> +++ b/bitbake/lib/bb/fetch2/git.py
> @@ -305,8 +305,8 @@ class Git(FetchMethod):
>              username = ""
>  
>          basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
> -        cmd = "%s ls-remote %s://%s%s%s %s" % \
> -              (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
> +        cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \
> +              (basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name], ud.unresolvedrev[name])

Shouldn't this be ud.branches[name] for dora?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] bitbake: fetch2/git: Anchor names when using ls-remote
  2014-03-26 10:04   ` Richard Purdie
@ 2014-03-27  3:25     ` Robert Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2014-03-27  3:25 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel



On 03/26/2014 06:04 PM, Richard Purdie wrote:
> On Wed, 2014-03-26 at 05:27 -0400, Robert Yang wrote:
>> From: Richard Purdie <richard.purdie@linuxfoundation.org>
>>
>> When specifying tags, they're searched for unanchored so foo/bar could
>> match:
>>
>> refs/heads/abc/foo/bar
>> refs/heads/xyz/foo/bar
>> refs/heads/foo/bar
>>
>> This change anchors the expressions so they are based against heads
>> or tags (or any other base level tree that has been created).
>>
>> (Bitbake master rev: df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4)
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>
>> Conflicts:
>> 	bitbake/lib/bb/fetch2/git.py
>> 	(ud.basecmd and basecmd conflicts, keep using basecmd)
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   bitbake/lib/bb/fetch2/git.py |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
>> index 6175e4c..cff5ce1 100644
>> --- a/bitbake/lib/bb/fetch2/git.py
>> +++ b/bitbake/lib/bb/fetch2/git.py
>> @@ -305,8 +305,8 @@ class Git(FetchMethod):
>>               username = ""
>>
>>           basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
>> -        cmd = "%s ls-remote %s://%s%s%s %s" % \
>> -              (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
>> +        cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \
>> +              (basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name], ud.unresolvedrev[name])
>
> Shouldn't this be ud.branches[name] for dora?
>

OOPS, thanks, I've updated the patch:

git://git.pokylinux.org/poky-contrib robert/dora-next
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/dora-next

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 6175e4c..989d72c 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -305,8 +305,8 @@ class Git(FetchMethod):
              username = ""

          basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
-        cmd = "%s ls-remote %s://%s%s%s %s" % \
-              (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
+        cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \
+              (basecmd, ud.proto, username, ud.host, ud.path, 
ud.branches[name], ud.branches[name])
          if ud.proto.lower() != 'file':
              bb.fetch2.check_network_access(d, cmd)
          output = runfetchcmd(cmd, d, True)

// Robert


> Cheers,
>
> Richard
>
>
>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-27  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26  9:27 [dora] [PATCH 0/1] bitbake: fetch2/git: Anchor names when using ls-remote Robert Yang
2014-03-26  9:27 ` [PATCH 1/1] " Robert Yang
2014-03-26 10:04   ` Richard Purdie
2014-03-27  3:25     ` Robert Yang

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.