[OE-core] [PATCH 3/5] ccache.bbclass: Only let native recipes depend on ccache-native

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jan 24 12:46:33 UTC 2019


On Thu, 2019-01-24 at 14:57 +0800, Robert Yang wrote:
> Make native recipes depend on ccache-native should be enough since native
> recipes are on target/nativesdk recipes' dependency chain, this can reduce the
> size of DEPENDS.
> 
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
>  meta/classes/ccache.bbclass | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
> index b545735..6caaca7 100644
> --- a/meta/classes/ccache.bbclass
> +++ b/meta/classes/ccache.bbclass
> @@ -47,8 +47,11 @@ python() {
>      # quilt-native doesn't need ccache since no c files
>      if not (pn in ('ccache-native', 'quilt-native') or
>              bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
> -        d.appendVar('DEPENDS', ' ccache-native')
>          d.setVar('CCACHE', 'ccache ')
> +        # Make native recipes depend on ccache-native should be enough since
> +        # native recipes are on target recipes' dependency chain.
> +        if bb.data.inherits_class('native', d):
> +            d.appendVar('DEPENDS', ' ccache-native')
>  }
>  
>  addtask cleanccache after do_clean

This is not correct. Think about the case where the native recipes were
installed from sstate. The target recipe dependencies would then be
incorrect.

Cheers,

Richard



More information about the Openembedded-core mailing list