mirror of
https://git.yoctoproject.org/poky
synced 2026-05-05 07:39:49 +02:00
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>
This commit is contained in:
@@ -555,6 +555,9 @@ class FetchData(object):
|
||||
if not self.method:
|
||||
raise NoMethodError(url)
|
||||
|
||||
if hasattr(self.method, "urldata_init"):
|
||||
self.method.urldata_init(self, d)
|
||||
|
||||
if self.method.supports_srcrev():
|
||||
self.revisions = {}
|
||||
for name in self.names:
|
||||
@@ -564,8 +567,8 @@ class FetchData(object):
|
||||
if len(self.names) == 1:
|
||||
self.revision = self.revisions[self.names[0]]
|
||||
|
||||
if hasattr(self.method, "urldata_init"):
|
||||
self.method.urldata_init(self, d)
|
||||
if hasattr(self.method, "fixuprevisions"):
|
||||
self.method.fixuprevisions(self, d)
|
||||
|
||||
if "localpath" in self.parm:
|
||||
# if user sets localpath for file, use it instead.
|
||||
|
||||
Reference in New Issue
Block a user