summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-10-03 13:27:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-03 17:30:17 +0100
commit0e6cc44a111ff3189011d503217223745055a643 (patch)
treebc2d509260cc59b8cd7078488956ad6be1c8e9b5 /bitbake
parent27c30e46d95da244686378fa6aa5971d07cc38e5 (diff)
downloadpoky-0e6cc44a111ff3189011d503217223745055a643.tar.gz
bitbake: fetch2: raise an exception if user specifies protocol=git with http://
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 <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 9affa0da5f..ea99198a7b 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -49,6 +49,9 @@ class Wget(FetchMethod):
49 return True 49 return True
50 50
51 def urldata_init(self, ud, d): 51 def urldata_init(self, ud, d):
52 if 'protocol' in ud.parm:
53 if ud.parm['protocol'] == 'git':
54 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)
52 55
53 if 'downloadfilename' in ud.parm: 56 if 'downloadfilename' in ud.parm:
54 ud.basename = ud.parm['downloadfilename'] 57 ud.basename = ud.parm['downloadfilename']