Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] bitbake/fetch2/git: Don't set the branch name to None, that makes no sense
@ 2012-05-11 17:14 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-05-11 17:14 UTC (permalink / raw)
  To: bitbake-devel

With floating revisions and no specified branch, the fetcher could fail
with some obtuse errors. This was due to the branch name being set to None
which makes no sense. This patch reworks some conditions to avoid this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index bcc0da5..5efdfa9 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -123,7 +123,8 @@ 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]
+                if ud.revisions[name]:
+                    ud.branches[name] = ud.revisions[name]
                 ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
 
         gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.'))





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-11 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 17:14 [PATCH] bitbake/fetch2/git: Don't set the branch name to None, that makes no sense Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox