[bitbake-devel] [PATCH 6/9] fetch2: declare urldata_init in base class
Urs Fässler
urs.fassler at bbv.ch
Mon Jul 23 15:42:56 UTC 2018
Declare urldata_init in FetchMethod since it is implemented by every
fetcher anyway. Always call urldata_init in FetchData init.
Signed-off-by: Urs Fässler <urs.fassler at bbv.ch>
Signed-off-by: Pascal Bach <pascal.bach at siemens.com>
---
lib/bb/fetch2/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index a83526a5..c8653d62 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1259,8 +1259,7 @@ class FetchData(object):
logger.warning('Consider updating %s recipe to use "protocol" not "proto" in SRC_URI.', d.getVar('PN'))
self.parm["protocol"] = self.parm.get("proto", None)
- if hasattr(self.method, "urldata_init"):
- self.method.urldata_init(self, d)
+ self.method.urldata_init(self, d)
if "localpath" in self.parm:
# if user sets localpath for file, use it instead.
@@ -1349,6 +1348,12 @@ class FetchMethod(object):
return True
+ def urldata_init(self, ud, d):
+ """
+ init method specific variable within url data
+ """
+ pass
+
def recommends_checksum(self, urldata):
"""
Is the backend on where checksumming is recommended (should warnings
--
2.18.0
More information about the bitbake-devel
mailing list