diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-01-31 19:12:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-03 17:02:02 +0000 |
commit | 6437b324a15e2730a12968beb58c2087aa712f46 (patch) | |
tree | f140a0516ae7dc75bc72dd32ff1316515f491a30 | |
parent | 5ac3ab3b565f70cd90cfbe121ddd2d899bfc0214 (diff) | |
download | bitbake-6437b324a15e2730a12968beb58c2087aa712f46.tar.gz |
ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
* taken from SFTP fetcher:
http://patchwork.openembedded.org/patch/43027/
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/ssh.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py index 61db435e7..721fb358b 100644 --- a/lib/bb/fetch2/ssh.py +++ b/lib/bb/fetch2/ssh.py @@ -73,6 +73,11 @@ class SSH(FetchMethod): return False def urldata_init(self, urldata, d): + if 'protocol' in urldata.parm and urldata.parm['protocol'] == 'git': + raise bb.fetch2.ParameterError( + "Invalid protocol - if you wish to fetch from a git " + + "repository using ssh, you need to use " + + "git:// prefix with protocol=ssh", urldata.url) m = __pattern__.match(urldata.url) path = m.group('path') host = m.group('host') |