From 6e9776042b7ae58b1b38924933dbd5d0e7426029 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 31 Jan 2013 19:12:09 +0100 Subject: bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git * taken from SFTP fetcher: http://patchwork.openembedded.org/patch/43027/ (Bitbake rev: 6437b324a15e2730a12968beb58c2087aa712f46) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/ssh.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake') 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): 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') -- cgit v1.2.3-54-g00ecf