[bitbake-devel] [PATCH-V2 5/5] fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"

Andrei Gherzan andrei at gherzan.ro
Tue Jul 10 21:34:17 UTC 2012


As well, if "proto" is used, get the associated value as "protocol"

Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
---
 bitbake/lib/bb/fetch2/__init__.py |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 52e12a0..fa963be 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -755,6 +755,10 @@ class FetchData(object):
         if localonly and not isinstance(self.method, local.Local):
             raise NonLocalMethod()
 
+        if self.parm.get("proto", None) and "protocol" not in self.parm:
+            logger.warn('Consider updating %s recipe to use "protocol" not "proto" in SRC_URI.', d.getVar('PN', True))
+            self.parm["protocol"] = self.parm.get("proto", None)
+
         if hasattr(self.method, "urldata_init"):
             self.method.urldata_init(self, d)
 
-- 
1.7.9.5





More information about the bitbake-devel mailing list