summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-01-28 16:56:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-31 12:46:21 +0000
commit9df0588ab419785ae900b53d8c0c26424239e1c0 (patch)
treee5950007488dcc1e8494683f539efd0cf78a8ca6 /bitbake/lib/bb/fetch2
parente863851045ffce62bef65d8d414e11489641395c (diff)
downloadpoky-9df0588ab419785ae900b53d8c0c26424239e1c0.tar.gz
bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
* taken from SFTP fetcher: http://patchwork.openembedded.org/patch/43027/ (Bitbake rev: 88e565855b52e905156d85c3f45b341cddfe2f55) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index 61db435e71..721fb358ba 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -73,6 +73,11 @@ class SSH(FetchMethod):
73 return False 73 return False
74 74
75 def urldata_init(self, urldata, d): 75 def urldata_init(self, urldata, d):
76 if 'protocol' in urldata.parm and urldata.parm['protocol'] == 'git':
77 raise bb.fetch2.ParameterError(
78 "Invalid protocol - if you wish to fetch from a git " +
79 "repository using ssh, you need to use " +
80 "git:// prefix with protocol=ssh", urldata.url)
76 m = __pattern__.match(urldata.url) 81 m = __pattern__.match(urldata.url)
77 path = m.group('path') 82 path = m.group('path')
78 host = m.group('host') 83 host = m.group('host')