Bug 1142 - git fetcher error when wrong protocol is specified is not helpful
Summary: git fetcher error when wrong protocol is specified is not helpful
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.1 M2
Assignee: Scott Garman
QA Contact:
URL:
Whiteboard: 2011-06-20: Patch submitted to bitbak...
Depends on:
Blocks:
 
Reported: 2011-06-06 13:40 UTC by Scott Garman
Modified: 2011-06-22 10:18 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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."