Bug 1855

Summary: [bitbake-layers] no attribute 'fetch2' error with a new working dir
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jiajun Xu <jiajun.xu>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: Fix merged to master (4 Jan)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2011-12-20 20:49:35 UTC
tree/branch: poky/1.2_M1
commit: b806f726b1db2cb605869c1022ef727c1110255b

If I run bitbake-layers(show_appends, show_layers, show_overlayed) in a new workding dir, it will report "'module' object has no attribute 'fetch2'". If I run some other bitbake command like "bitbake -s" under the folder, the issue won't happen again with bitbake-layers.
Comment 1 Paul Eggleton 2011-12-29 05:59:18 UTC
A simple "import bb.fetch2" at the beginning of bitbake-layers corrects this; however I'm not sure if this is an acceptable fix. Another alternative would be to have a wrapper script that simply sets BBFETCH2=True, but I'm not sure I particularly like that idea either.
Comment 2 Paul Eggleton 2011-12-29 06:37:09 UTC
Chris Larson seems to think the former import approach is OK, have sent a patch to the bitbake-devel list.
Comment 3 Paul Eggleton 2012-01-04 06:17:39 UTC
Fix merged to master in revision f540034864cb2afdd47486b271900e1021ae0b27.