Skip to contentSkip to conversation

Warn user if "param" is used in SRC_URI

PATCH Applied Andrei Gherzan 2 participants 7 messages Jul 10, 2012 – Jul 11, 2012

lore
Share & tools
lore
#0 lore raw

v2 cover Warn user if "param" is used in SRC_URI

The following changes since commit 90ad663909c0c8a405b22a510c9f957007d02669:

upstream_tracking: update boost (2012-07-09 17:21:38 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ag/protocol
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/protocol

Andrei Gherzan (5):
fetch2/svn.py: Use "protocol" parameter to get the protocol fetch2/osc.py: Use "protocol" parameter to get the protocol fetch2/hg.py: Use "protocol" parameter to get the protocol fetch2/bzr.py: Use "protocol" parameter to get the protocol fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not
"protocol"

 bitbake/lib/bb/fetch2/__init__.py |    4 ++++
 bitbake/lib/bb/fetch2/bzr.py      |    2 +-
 bitbake/lib/bb/fetch2/hg.py       |    2 +-
 bitbake/lib/bb/fetch2/osc.py      |    2 +-
 bitbake/lib/bb/fetch2/svn.py      |    2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/5 fetch2/svn.py: Use "protocol" parameter to get the protocol

---
 bitbake/lib/bb/fetch2/svn.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/svn.py +1 -1
index bc5b96b..ea5902e 100644
@@ -71,7 +71,7 @@ class Svn(FetchMethod):
         command is "fetch", "update", "info"
         """
 
-        proto = ud.parm.get('proto', 'svn')
+        proto = ud.parm.get('protocol', 'svn')
 
         svn_rsh = None
         if proto == "svn+ssh" and "rsh" in ud.parm:
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 2/5 fetch2/osc.py: Use "protocol" parameter to get the protocol

---
 bitbake/lib/bb/fetch2/osc.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/osc.py +1 -1
index a16a53e..1a3a7bb 100644
@@ -57,7 +57,7 @@ class Osc(FetchMethod):
 
         basecmd = data.expand('${FETCHCMD_osc}', d)
 
-        proto = ud.parm.get('proto', 'ocs')
+        proto = ud.parm.get('protocol', 'ocs')
 
         options = []
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 3/5 fetch2/hg.py: Use "protocol" parameter to get the protocol

In reply to Andrei Gherzan
---
 bitbake/lib/bb/fetch2/hg.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/hg.py +1 -1
index ad6e85d..155ae67 100644
@@ -82,7 +82,7 @@ class Hg(FetchMethod):
 
         basecmd = data.expand('${FETCHCMD_hg}', d)
 
-        proto = ud.parm.get('proto', 'http')
+        proto = ud.parm.get('protocol', 'http')
 
         host = ud.host
         if proto == "file":
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v2 4/5 fetch2/bzr.py: Use "protocol" parameter to get the protocol

In reply to Andrei Gherzan
---
 bitbake/lib/bb/fetch2/bzr.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/bzr.py +1 -1
index 0d10eb4..97daa62 100644
@@ -60,7 +60,7 @@ class Bzr(FetchMethod):
 
         basecmd = data.expand('${FETCHCMD_bzr}', d)
 
-        proto =  ud.parm.get('proto', 'http')
+        proto =  ud.parm.get('protocol', 'http')
 
         bzrroot = ud.host + ud.path
 
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 5/5 fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"

In reply to Andrei Gherzan

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

---
 bitbake/lib/bb/fetch2/__init__.py |    4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/fetch2/__init__.py +4 -0
index 52e12a0..fa963be 100644
@@ -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)
 
Signature · 1 line
1.7.9.5
#6 lore raw
In reply to Andrei Gherzan
Quoted 9 lines · Andrei Gherzan

The following changes since commit 90ad663909c0c8a405b22a510c9f957007d02669:

upstream_tracking: update boost (2012-07-09 17:21:38 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ag/protocol
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/protocol

Quoted 7 lines

Andrei Gherzan (5):
fetch2/svn.py: Use "protocol" parameter to get the protocol fetch2/osc.py: Use "protocol" parameter to get the protocol fetch2/hg.py: Use "protocol" parameter to get the protocol fetch2/bzr.py: Use "protocol" parameter to get the protocol fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not
"protocol"

Merged to master, thanks.

Richard