diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-19 23:31:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-19 23:48:41 +0100 |
commit | 2d2d07275c8a2d652a221c1cd74d28c2f6f226d5 (patch) | |
tree | 1178423ada6bcda94e68e69b28ac915865bfb719 /bitbake/lib/bb/fetch2/git.py | |
parent | 029635eb78b95ea1d19ba250dde3ae2513b57aa6 (diff) | |
download | poky-2d2d07275c8a2d652a221c1cd74d28c2f6f226d5.tar.gz |
bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badly
Fix a bug where ud.branches were being referenced before it was set by
the git fetcher when using AUTOREV. To do this some ordering needed
to be changed. This fixes errors like:
ERROR: Error parsing /recipes-kernel/linux/rt-tests_git.bb: Failure expanding variable
SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception
AttributeError: 'FetchData' object has no attribute 'branches'
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 1679f81511..553e1281f2 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -72,15 +72,16 @@ class Git(FetchMethod): | |||
72 | 72 | ||
73 | ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" | 73 | ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" |
74 | 74 | ||
75 | ud.write_tarballs = (data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0" | ||
76 | |||
77 | ud.localfile = ud.clonedir | ||
78 | |||
79 | def fixuprevisions(self, ud, d): | ||
75 | for name in ud.names: | 80 | for name in ud.names: |
76 | # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one | 81 | # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one |
77 | if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]): | 82 | if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]): |
78 | ud.revisions[name] = self.latest_revision(ud.url, ud, d, name) | 83 | ud.revisions[name] = self.latest_revision(ud.url, ud, d, name) |
79 | 84 | ||
80 | ud.write_tarballs = (data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0" | ||
81 | |||
82 | ud.localfile = ud.clonedir | ||
83 | |||
84 | def localpath(self, url, ud, d): | 85 | def localpath(self, url, ud, d): |
85 | return ud.clonedir | 86 | return ud.clonedir |
86 | 87 | ||