From: Paul Eggleton Date: Wed, 3 Oct 2012 12:27:57 +0000 (+0100) Subject: bitbake: fetch2: raise an exception if user specifies protocol=git with http:// X-Git-Tag: rev_ivi_2015_02_04~15250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d0b75a9c92baae3364ec0e95260fd9a04b32b97;p=scm%2Fbb%2Ftizen-distro.git bitbake: fetch2: raise an exception if user specifies protocol=git with It is a common mistake to use http:// and protocol=git when attempting to fetch from a git repository using the http protocol; if this is detected then throw an error explaining that you need to use git:// with protocol=http instead. (Bitbake rev: 5bc4930c1638db16bcd5f9c8cfc4081f9ffc192b) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 9affa0d..ea99198 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -49,6 +49,9 @@ class Wget(FetchMethod): return True def urldata_init(self, ud, d): + if 'protocol' in ud.parm: + if ud.parm['protocol'] == 'git': + raise bb.fetch2.ParameterError("Invalid protocol - if you wish to fetch from a git repository using http, you need to instead use the git:// prefix with protocol=http", ud.url) if 'downloadfilename' in ud.parm: ud.basename = ud.parm['downloadfilename']