Patchwork [bitbake-devel,3/5] fetch2/hg.py: Use "protocol" parameter and warn user if recipe is using "proto"

login
register
mail settings
Submitter Andrei Gherzan
Date July 10, 2012, 11:16 a.m.
Message ID <f597d06bf1b2146f1321d3779951776038137048.1341918809.git.andrei@gherzan.ro>
Download mbox | patch
Permalink /patch/31613/
State New
Headers show

Comments

Andrei Gherzan - July 10, 2012, 11:16 a.m.
If SRC_URI uses the parameter "proto" while specifying the protocol, use this
value but warn the user about this problem.

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

Patch

diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index ad6e85d..31ba1cf 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -82,7 +82,12 @@  class Hg(FetchMethod):
 
         basecmd = data.expand('${FETCHCMD_hg}', d)
 
-        proto = ud.parm.get('proto', 'http')
+        proto = ud.parm.get('protocol', 'http')
+
+        if ud.parm.get('proto') is not None:
+            logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True))
+            # Use proto value for now
+            proto =  ud.parm.get('proto')
 
         host = ud.host
         if proto == "file":