Discussion:
Fetcher failure for git repository using tag name in SRCREV
Richard Leitner
2014-07-07 13:18:55 UTC
Permalink
Hi folks,
I've ran into a problem using tag names in SRCREV for git repositories after migrating from 1.4 to 1.6.1 "daisy".

Before (1.4) the following worked fine:
SRCREV = "v${PV}"
SRC_URI = "git://github.com/rleitner/psplash.git;protocol=https"

When using 1.6.1 the following error message is produced:
ERROR: Function failed: Fetcher failure for URL: 'git://github.com/rleitner/psplash.git;protocol=https'. The command git ls-remote https://github.com/rleitner/psplash.git refs/heads/v2014-02-03 refs/tags/v2014-02-03^{} gave empty output unexpectedly

I think the refs/heads argument in the git ls-remote call should contain the branch instead of the tag name.
A "fixed" call would then look like this:
git ls-remote https://github.com/rleitner/psplash.git refs/heads/master refs/tags/v2014-02-03^{}

I also think I've found the error in the source and will send a patch in reply to this message.

regards,
richard
--
Richard Leitner
2014-07-07 13:21:16 UTC
Permalink
Use the branch in refs/head instead of the tag.
This allows a given tag name to differ from the branch name.

Signed-off-by: Richard Leitner <richard.leitner-***@public.gmane.org>
---
bitbake/lib/bb/fetch2/git.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 9ca2442..d30f109 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -339,7 +339,7 @@ class Git(FetchMethod):
"""
Compute the HEAD revision for the url
"""
- search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
+ search = "refs/heads/%s refs/tags/%s^{}" % (ud.branches[name], ud.unresolvedrev[name])
output = self._lsremote(ud, d, search)
return output.split()[0]
--
1.7.10.4

--
Loading...