From patchwork Thu Jan 31 18:12:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,for-1.16,2/3] ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git Date: Thu, 31 Jan 2013 18:12:09 -0000 From: Martin Jansa X-Patchwork-Id: 43765 Message-Id: <1359655930-1404-2-git-send-email-Martin.Jansa@gmail.com> To: bitbake-devel@lists.openembedded.org Cc: Martin Jansa From: Martin Jansa * taken from SFTP fetcher: http://patchwork.openembedded.org/patch/43027/ Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- lib/bb/fetch2/ssh.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py index 61db435..721fb35 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')