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

Submitted by Andrei Gherzan on July 10, 2012, 9:34 p.m.


Message ID 9362ec74cf7c182a17e7e23d99f2a934f9d8a8cf.1341955881.git.andrei@gherzan.ro
State New
Headers show

Commit Message

Andrei Gherzan July 10, 2012, 9:34 p.m.
As well, if "proto" is used, get the associated value as "protocol"

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

Patch hide | download patch | download mbox

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)