bitbake: bitbake: fetch2/git: Anchor names when using ls-remote
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) (Bitbake rev: da93afe9834e137ed1e9410380181286c80198b5) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c65c136746
commit
50e9ccb2af
|
@ -305,8 +305,8 @@ class Git(FetchMethod):
|
||||||
username = ""
|
username = ""
|
||||||
|
|
||||||
basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
|
basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
|
||||||
cmd = "%s ls-remote %s://%s%s%s %s" % \
|
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])
|
(basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name], ud.branches[name])
|
||||||
if ud.proto.lower() != 'file':
|
if ud.proto.lower() != 'file':
|
||||||
bb.fetch2.check_network_access(d, cmd)
|
bb.fetch2.check_network_access(d, cmd)
|
||||||
output = runfetchcmd(cmd, d, True)
|
output = runfetchcmd(cmd, d, True)
|
||||||
|
|
Loading…
Reference in New Issue