Bug 8893

Summary: do_cleanall: Function failed: Network access disabled through BB_NO_NETWORK
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED NOTABUG QA Contact:
Severity: major    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, richard.purdie
Version: 2.1   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robert Yang 2016-01-07 01:46:12 UTC
The meta-selinux layer:
$ bitbake refpolicy-mls -ccleanall

Log data follows:
| DEBUG: Executing python function do_cleanall
| DEBUG: Python function do_cleanall finished
| ERROR: Function failed: Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command git -c core.fsyncobjectfiles=0 ls-remote git://github.com/TresysTechnology/refpolicy.git  (for url None)
ERROR: Task 3 (/buildarea/lyang1/test_qemux86/layers/meta-selinux/recipes-security/refpolicy/refpolicy-mls_git.bb, do_cleanall) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4 tasks of which 0 didn't need to be rerun and 1 failed.

do_cleanall should not require NETWORK.
Comment 1 Richard Purdie 2016-01-07 16:41:09 UTC
I suspect this is a recipe using SRCREV = ${AUTOREV} since that would trigger a network lookup using git ls-remote. We need to do that to construct PV which is needed to construct the WORKDIR paths so we know where to clean things. I therefore worry about how we'd try and fix this...
Comment 2 Richard Purdie 2016-05-12 15:05:07 UTC
This is a configuration issue with the layer/recipe in question. If they're set to use the network for revisions/branch lookup, they need to use the network. cleanall works fine if recipes aren't setup that way.