summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2011-06-19 16:15:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-22 16:27:30 +0100
commit48cd942be181f23e3b7d7cff1753013ed36c9486 (patch)
tree6fffd70e875ccd52d2cda02897f95fe7ee9d2df6 /bitbake
parent3b79156be8300ebf348e6a8e14c8e7facd66a5b6 (diff)
downloadpoky-48cd942be181f23e3b7d7cff1753013ed36c9486.tar.gz
fetch2/git.py: improve error reporting when an invalid protocol is used
When an invalid 'protocol' parameter is used in a git SRC_URI, the error reported was not helpful: ERROR: Function 'Fetcher failure for URL: 'None'. <environment dump> fatal: Could not make temporary directory: No such file or directory So instead check that ud.proto is set to something valid, and if not raise a meaningful ParameterError which explains that the protocol type is the source of the problem. This fixes bug [YOCTO #1142] (Bitbake rev: a2a29b72275ab03a263f4479a590b92111a0d6a8) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 6979beaef5..f3bc793a6a 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -88,6 +88,9 @@ class Git(FetchMethod):
88 else: 88 else:
89 ud.proto = "git" 89 ud.proto = "git"
90 90
91 if not ud.proto in ('git', 'file', 'ssh', 'http', 'https'):
92 raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)
93
91 ud.nocheckout = ud.parm.get("nocheckout","0") == "1" 94 ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
92 95
93 ud.rebaseable = ud.parm.get("rebaseable","0") == "1" 96 ud.rebaseable = ud.parm.get("rebaseable","0") == "1"