bitbake: fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"
authorAndrei Gherzan <andrei@gherzan.ro>
Tue, 10 Jul 2012 21:34:17 +0000 (00:34 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Jul 2012 14:55:26 +0000 (15:55 +0100)
As well, if "proto" is used, get the associated value as "protocol"

(Bitbake rev: 53e6b630f0463d2d07cdaa9c9eb36794dc9b6b69)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index 52e12a0..fa963be 100644 (file)
@@ -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)