Patchwork [1/1] git fetcher: make tag back to work, fix Yocto bug 972

mail settings
Submitter Yu Ke
Date April 27, 2011, 4:48 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/2895/
State New, archived
Headers show


Yu Ke - April 27, 2011, 4:48 a.m.
From: Yu Ke <>

In current git fetcher, tag does not work due to commit Tag is not in sha256 form, so it will be treated invalid, and silently replaced by latest revision.

To fix it, this patch treat tag name as branches name, thus it will be handled correctly later. Thanks Richard for reviewing and proposing the better approach.

Fix [YOCTO #972]

CC: Richard Purdie <>

Signed-off-by: Yu Ke <>
 bitbake/lib/bb/fetch2/ |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/bitbake/lib/bb/fetch2/ b/bitbake/lib/bb/fetch2/
index d462acf..811acbf 100644
--- a/bitbake/lib/bb/fetch2/
+++ b/bitbake/lib/bb/fetch2/
@@ -81,6 +81,7 @@  class Git(FetchMethod):
         for name in ud.names:
             # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
             if not ud.revisions[name] or len(ud.revisions[name]) != 40  or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
+                ud.branches[name] = ud.revisions[name]
                 ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
     def localpath(self, url, ud, d):