[OE-core] [PATCH] base.bbclass: add cleansstate task between clean and cleanall

Darren Hart dvhart at linux.intel.com
Fri Jun 3 05:43:11 UTC 2011



On 06/02/2011 11:56 AM, Martin Jansa wrote:
> * sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild
> 
> Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> ---
>  meta/classes/base.bbclass |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 8f4ef1e..6f0484e 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -408,10 +408,13 @@ def check_gcc3(data):
>  	
>  	return False
>  
> -addtask cleanall after do_clean
> -python do_cleanall() {
> +addtask cleansstate after do_clean
> +python do_cleansstate() {
>          sstate_clean_cachefiles(d)
> +}
>  
> +addtask cleanall after do_cleansstate
> +python do_cleanall() {
>          src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
>          if len(src_uri) == 0:
>              return

I do this _a lot_ manually. This would take some of the guesswork and
lazy wildcard usage deleting more than is necessary. Is there any
documentation necessary to make it clear how this new clean directive
would be used? I know there is some resistance to adding additional
clean variants - some docs might help assuage that?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




More information about the Openembedded-core mailing list