Bug 2283 - HOB: Hob doesn't work with rm_work
Summary: HOB: Hob doesn't work with rm_work
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.2
Hardware: All Multiple
: High major
Target Milestone: 1.2 M4
Assignee: Dongxiao Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-04-12 06:31 UTC by Dexuan Cui
Modified: 2012-04-18 09:23 UTC (History)
11 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dexuan Cui 2012-04-12 06:31:32 UTC
In the self-hosted-image case, rm_work itself works when we run bitbake from the command line directly, but it doesn't work in hob.
This can explain why building a sato image with rm_work enabled in hob still needs 30GB disk space!

I think it's caused by: INHERIT is not respected in hob.

I can reproduce this bug every time when I run hob. e.g., when I use hob to build  the package acl, we can see: in its WORKDIR, everything is kept there, unremoved.

----

I believe in the normal case,(non-build-appliance case), we have the issue, too.
In this case, I'll try to give more detailed instructions about how to reproduce the issue later.
Comment 1 Dexuan Cui 2012-04-12 09:53:48 UTC
Below is the way to reproduce the bug on my Ubuntu host:

1) add
INHERIT += "rm_work"
into conf/local.conf

2) bitbake acl -c cleansstate;  bitbake acl; ls  tmp/work/i586-poky-linux/acl-2.2.51-r3/
we see in there are only the following:
acl-2.2.51  package  packages-split  pseudo  temp


3) bitbake acl -c cleansstate; 

4) in hob, choose "Create your own image" , "View recipes" -- choose acl and build the package.

5) now run "ls tmp/work/i586-poky-linux/acl-2.2.51-r3/" and we see
acl-2.2.51  debugsources.list  deploy-ipks  image  license-destdir  package  packages-split  pkgdata  pseudo  relative-libdir.patch  shlibs  sysroot-destdir  temp

This shows rm_work doesn't work at all in the case of hob.
Comment 2 Lianhao Lu 2012-04-12 16:58:21 UTC
Dongxiao confirms that INHERIT is respected by hob as long as it is set in the "bitbake.conf configuration file chains". 

The reason for this bug is that task do_rm_work is added after do_build. But hob only runs do_build task when building packages, so do_rm_work never gets the chance to be executed. 

Hob needs to run the task defined in BB_DEFAULT_TASK to build the packages.
Comment 3 Shane Wang 2012-04-13 10:18:31 UTC
Correct its category!
Comment 5 Dexuan Cui 2012-04-13 17:25:37 UTC
(In reply to comment #4)
> Ready at:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dxu4/hob-bugfix-temp&id=16c6add2870b9165fe2d25641479cffb8994b2af

We'll need to fix the MAGE_ROOTFS_EXTRA_SPACE variable(20G is probably enough, but we need to TEST) in meta/recipes-core/images/self-hosted-image.bb once this bug is fixed.
Comment 7 Dexuan Cui 2012-04-18 09:23:12 UTC
(In reply to comment #6)
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=276b86509ba29046828d283f15ae44ae0850d1d0

By testing building in the guest with the patch applied, I can verify the bug was fixed.