summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-11 18:14:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-13 20:09:52 +0100
commit279d0afd6ea0f2166c8b583d4ab5bd8aff7d9bf8 (patch)
tree815875eafa58441254d3d9e324ebc1960c425827 /bitbake/lib
parentd93e43a126acabeafaa88164cf586576c6ba645b (diff)
downloadpoky-279d0afd6ea0f2166c8b583d4ab5bd8aff7d9bf8.tar.gz
bitbake/fetch2/git: Don't set the branch name to None, that makes no sense
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. (Bitbake rev: 740c58d43cfb1445dd126e4827bb70ce988ca107) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/git.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index bcc0da583b..5efdfa9ca6 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -123,7 +123,8 @@ class Git(FetchMethod):
123 for name in ud.names: 123 for name in ud.names:
124 # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one 124 # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
125 if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]): 125 if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
126 ud.branches[name] = ud.revisions[name] 126 if ud.revisions[name]:
127 ud.branches[name] = ud.revisions[name]
127 ud.revisions[name] = self.latest_revision(ud.url, ud, d, name) 128 ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
128 129
129 gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.')) 130 gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.'))