Bug 9436 - lib/bb/fetch2/git.py: print more friendly errors messages when failedlib/bb/fetch2/git.py
Summary: lib/bb/fetch2/git.py: print more friendly errors messages when failedlib/bb/f...
Status: RESOLVED WORKSFORME
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.2 M3
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-12 03:42 UTC by Robert Yang
Modified: 2016-07-15 06:08 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2016-04-12 03:42:18 UTC
I got the following errros when do_fetch failed, the repo exists, but no required 
SRCREV, if it can print that "repo exits, but no SRCREV foo" would help a lot when debugging.

WARNING: linux-yocto-tiny-4.1.18+gitAUTOINC+ec633cccde_f5b08e95bc-r0 do_fetch: Failed to fetch URL git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=kernel-meta, attempting MIRRORS if available
ERROR: linux-yocto-tiny-4.1.18+gitAUTOINC+ec633cccde_f5b08e95bc-r0 do_fetch: Fetcher failure: Fetch command failed with exit code 128, output:
fatal: remote origin already exists.

ERROR: linux-yocto-tiny-4.1.18+gitAUTOINC+ec633cccde_f5b08e95bc-r0 do_fetch: Function failed: Fetcher failure for URL: 'git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=kernel-meta'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /buildarea/lyang1/test_tiny/tmp/work/qemux86-poky-linux-musl/linux-yocto-tiny/4.1.18+gitAUTOINC+ec633cccde_f5b08e95bc-r0/temp/log.do_fetch.35233
ERROR: Task 50 (/buildarea/lyang1/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb, do_fetch) failed with exit code '1'
Comment 1 Chen Qi 2016-07-15 05:21:12 UTC
I did a little test, it seems that the fetcher can output some meaningful information as required in this bug.

Please see the error message below.

ERROR: systemd-1_230+gitAUTOINC+1a74d4fc90-r0 do_fetch: Fetcher failure: Unable to find revision 1a74d4fc90cb322a4784a3515bef7118c8f8c5ba in branch master even from upstream
ERROR: systemd-1_230+gitAUTOINC+1a74d4fc90-r0 do_fetch: Function failed: Fetcher failure for URL: 'git://github.com/systemd/systemd.git;protocol=git'. Unable to fetch URL from any source.
Comment 2 Chen Qi 2016-07-15 06:08:33 UTC
The information in output is correct, thus closing this bug.