Bug 3285

Summary: BB_FETCH_PREMIRROR_ONLY failure message is confusing
Product: [Build System, Metadata & Runtime] BitBake Reporter: Evadeflow <evadeflow>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Low CC: corneliux.stoicescu, poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Evadeflow 2012-10-12 22:10:47 UTC
Forked this item from issue #3222: when BB_FETCH_PREMIRRORONLY is set and bitbake fails to locate the source to be downloaded in a pre-mirror, it sets BB_NO_NETWORK to 1 so that subsequent attempts to download will fail. The error message emitted in this case looks like:

> ERROR: Function failed: Network access disabled through BB_NO_NETWORK but access rquested with command git clone --bare --mirror http://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git /home/evadeflow/projects/poky-git/build/downloads/git2/dev.omapzoom.org.pub.scm.integration.kernel-ubuntu.git (for url None)

This is confusing when the user did set BB_NO_NETWORK himself. A much clearer error message would be:

> ERROR: BB_FETCH_PREMIRRORONLY enabled, but git2_dev.omapzoom.org.pub.scm.integration.kernel-ubuntu.git.tar.gz
> could not be found in any mirror

A quick skim of the code indicates that this is doable, but not altogether trivial. I'll submit a patch when I have time...
Comment 1 Richard Purdie 2013-06-20 20:59:11 UTC
I cheated a little and merged: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=801fbe5a0c1316ac54a3e8ea61c42a74e28bb0ed
which at least gives the user a pointer to what is going on.
Comment 2 Stoicescu Cornel 2013-10-02 11:37:06 UTC
New error contains a more clear debug message. 

Verified in:
poky master:4d8ab87d25ea6e59dc88375813ef88ee0ac813d0