aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-20 14:30:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-13 18:57:25 +0100
commitda93afe9834e137ed1e9410380181286c80198b5 (patch)
tree6de96ce131e20a6bea8ba2549d54a283a4fb0433
parent3c694e20df3b1d442603300786580e4b2f4bf5f3 (diff)
downloadbitbake-da93afe9834e137ed1e9410380181286c80198b5.tar.gz
bitbake-da93afe9834e137ed1e9410380181286c80198b5.tar.bz2
bitbake-da93afe9834e137ed1e9410380181286c80198b5.zip
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) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 6175e4c7..989d72cb 100644
--- a/lib/bb/fetch2/git.py
+++ b/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)