Bug 1142

Summary: git fetcher error when wrong protocol is specified is not helpful
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Scott Garman <scott.a.garman>
Component: meta-yoctoAssignee: Scott Garman <scott.a.garman>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Low CC: poky.bs.watcher, poky.watcher, sgw
Version: 1.0   
Target Milestone: 1.1 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: 2011-06-20: Patch submitted to bitbake-devel list
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Scott Garman 2011-06-06 13:40:40 UTC
Phil Bludnell noted that when you specify the wrong protocol in your recipe for a git-based SRC_URI, the error message is not helpful:

"If you fail to specify the right protocol for the
git fetcher then you end up with something like:

ERROR: Function 'Fetcher failure for URL: 'None'. Fetch command export
HOME="/home/pb"; export
GIT_CONFIG="/home/pb/oe/build/tmp-eglibc/sysroots/x86_64-linux/usr/etc/gitconfig"; export PATH="..."; git ls-remote rsync://gitolite@cam-git/pb/linux-2.6.35 master failed with signal 128, output:
fatal: Could not make temporary directory: No such file or directory
' failed

Usually the value of $PATH is about half a screenful so this error looks
more monstrous in real life than it probably does above, and it isn't
immediately apparent that the "no such file or directory" thing is a
result of having tried to fetch with the wrong URI scheme. 

This is made slightly more irritating by the fact that there isn't much
consistency between the different fetchers about the URI structure; some
of them want a "proto" attribute whereas others (including git) want
"protocol", so it's harder than perhaps it ought to be to remember what
the correct naming is."