Skip to contentSkip to conversation

Bitbake 1.22 GIT fetcher problem with tags

PATCH Boszormenyi Zoltan 1 participant 1 message Jun 12, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

when fetching a git:// source using SRCREV="tag_name", do_fetch often fails. The attached patch solves it. We still use a Yocto 1.6 based system and it is a necessity. Can you get this or the patch from bitbake's master branch backported into old bitbake branches?

Thanks in advance and best regards,
Zoltán Böszörményi

lib/bb/fetch2/git.py +1 -1
index 5d1a358..3897172 100644
@@ -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 refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name], ud.unresolvedrev[name])
         output = self._lsremote(ud, d, search)
         return output.split()[0]