Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: [PATCH][for-1.16 2/3] ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
Date: Thu, 31 Jan 2013 19:12:09 +0100	[thread overview]
Message-ID: <1359655930-1404-2-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <1359655930-1404-1-git-send-email-Martin.Jansa@gmail.com>

From: Martin Jansa <martin.jansa@gmail.com>

* 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>
---
 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')
-- 
1.8.1.2




  reply	other threads:[~2013-01-31 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 18:12 [PATCH][for-1.16 1/3] ssh: fix fetcher Martin Jansa
2013-01-31 18:12 ` Martin Jansa [this message]
2013-01-31 18:12 ` [PATCH][for-1.16 3/3] ssh.py: add example SRC_URI Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359655930-1404-2-git-send-email-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox