mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake/fetch2: Simplfy setup_srcrevs
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -574,7 +574,13 @@ class FetchData(object):
|
|||||||
raise NoMethodError("Missing implementation for url %s" % url)
|
raise NoMethodError("Missing implementation for url %s" % url)
|
||||||
|
|
||||||
if self.method.supports_srcrev():
|
if self.method.supports_srcrev():
|
||||||
self.setup_srcrevs(d)
|
self.revisions = {}
|
||||||
|
for name in self.names:
|
||||||
|
self.revisions[name] = Fetch.srcrev_internal_helper(self, d, name)
|
||||||
|
|
||||||
|
# add compatibility code for non name specified case
|
||||||
|
if len(self.names) == 1:
|
||||||
|
self.revision = self.revisions[self.names[0]]
|
||||||
|
|
||||||
if hasattr(self.method, "urldata_init"):
|
if hasattr(self.method, "urldata_init"):
|
||||||
self.method.urldata_init(self, d)
|
self.method.urldata_init(self, d)
|
||||||
@@ -592,18 +598,6 @@ class FetchData(object):
|
|||||||
self.md5 = basepath + '.md5'
|
self.md5 = basepath + '.md5'
|
||||||
self.lockfile = basepath + '.lock'
|
self.lockfile = basepath + '.lock'
|
||||||
|
|
||||||
def setup_srcrevs(self, d):
|
|
||||||
if not self.method.supports_srcrev():
|
|
||||||
return
|
|
||||||
|
|
||||||
self.revisions = {}
|
|
||||||
for name in self.names:
|
|
||||||
self.revisions[name] = Fetch.srcrev_internal_helper(self, d, name)
|
|
||||||
|
|
||||||
# add compatibility code for non name specified case
|
|
||||||
if len(self.names) == 1:
|
|
||||||
self.revision = self.revisions[self.names[0]]
|
|
||||||
|
|
||||||
def setup_localpath(self, d):
|
def setup_localpath(self, d):
|
||||||
if not self.localpath:
|
if not self.localpath:
|
||||||
self.localpath = self.method.localpath(self.url, self, d)
|
self.localpath = self.method.localpath(self.url, self, d)
|
||||||
|
|||||||
Reference in New Issue
Block a user