Bug 1468

Summary: Various kinds of hob errors reported on command line when using hob build multi-times/interact with customized .bb file
Product: [Build System, Metadata & Runtime] Hob Reporter: Jessica <jessica.zhang>
Component: hobAssignee: Joshua Lock - Disabled <josh>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: High CC: jessica.zhang, jiajun.xu, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jessica 2011-09-09 13:39:01 UTC
.  In a nutshell, it involved try using HOB to rebuild many times and add a package, save the customized .bb file, reload it and rebuild.  You can play with the following scenarios:

1. pick core-minimal-image, bake, then back bake again, after repeating several times, I'm seeing the following print from the command line:

Traceback (most recent call last):
  File "/home/jzhang/YBC/bitbake/lib/bb/ui/hob.py", line 468, in bake_clicked_cb
    self.handler.build_image(image_name, self.configurator)
  File "/home/jzhang/YBC/bitbake/lib/bb/ui/crumbs/hobeventhandler.py", line 259, in build_image
    if self.image_dir in bbpath.split(":"):
AttributeError: 'bool' object has no attribute 'split'

I put print statement, seems somewhere along the way BBPATH value will be changed to "True".  But once you hit this error, if you keep click on "Bake" eventually the correct BBPATH will be restored and you can do another build...

2. I add acl-dbg into my core-image-minimal, save the customization, then restart hob, I see following 2 issues:
a.  Even though after reload the customized .bb file, I see core-image-minimal is selected, when I hit bake, it'll complain empty image
b.  After I do reset then build, I'm starting to see the following from cml:
Traceback (most recent call last):
  File "/home/jzhang/YBC/bitbake/lib/bb/ui/hob.py", line 498, in build_complete_cb
    os.remove(f)
OSError: [Errno 2] No such file or directory: '/tmp/hob-images/hob-core-image-minimal-variant-2011-09-08.bb'

3. After seeing the above issues, when I start hob, it'll complain on the cml that parser can't parse BBFILES value since there're self reference, and I've noticed this is due to more following entries got into hob-post file:
BBFILES := "${BBFILES} /tmp/hob-images/*.bb"
And with following patch :

diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/cru
index 66dffac..de5fea0 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -277,7 +277,7 @@ class HobHandler(gobject.GObject):
         else:
             nbbf = None
 
-        if not bbfiles_ok or not bbpath_ok:
+        if not bbfiles_ok and not bbpath_ok:
             configurator.insertTempBBPath(nbbp, nbbf)

Again, all the problem will start showing after you use hob for several iterations