From patchwork Tue Jul 10 21:34:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, PATCH-V2, 5/5] fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol" Date: Tue, 10 Jul 2012 21:34:17 -0000 From: Andrei Gherzan X-Patchwork-Id: 31727 Message-Id: <9362ec74cf7c182a17e7e23d99f2a934f9d8a8cf.1341955881.git.andrei@gherzan.ro> To: bitbake-devel@lists.openembedded.org As well, if "proto" is used, get the associated value as "protocol" Signed-off-by: Andrei Gherzan --- 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)