Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Subject: Re: [PATCH] bitbake: do not set CCACHE_DISABLE=0
Date: Sun, 22 Jul 2012 09:41:09 +0100	[thread overview]
Message-ID: <1342946469.21788.54.camel@ted> (raw)
In-Reply-To: <1342871746-14583-1-git-send-email-enrico.scholz@sigma-chemnitz.de>

On Sat, 2012-07-21 at 13:55 +0200, Enrico Scholz wrote:
> ccache checks for existence of environment; not for its value:
> 
>   ---- ccache-3.1.7/ccache.c ---
>         if (getenv("CCACHE_DISABLE")) {
>                 cc_log("ccache is disabled");
> 
> Hence, avoid setting of $CCACHE_DISABLE instead of assigning '0'.
> 
> Unfortunately, bitbake has a similar behavior when evaluating 'export'
> and 'unexport' flags so that this variable must be set in a python
> function instead of declaring it in bitbake.conf.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  meta/classes/base.bbclass |    8 ++++++++
>  meta/conf/bitbake.conf    |    3 ---
>  2 files changed, 8 insertions(+), 3 deletions(-)

Why doesn't CCACHE_DISABLE[unexport] = "1" help here? Doesn't the
unexport flag stop this entering the environment?

Cheers,

Richard


> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 1f76023..9f9c803 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -309,6 +309,14 @@ do_build () {
>  python () {
>      import exceptions, string, re
>  
> +    # Disable ccache explicitly if CCACHE is null since gcc may be a
> +    # symlink of ccache some distributions (e.g., Fedora 17). Please
> +    # note that only the existence of $CCACHE_DISABLE matters; the
> +    # value is ignored.
> +    if d.getVar('CCACHE', True) == '':
> +        d.setVar('CCACHE_DISABLE', True)
> +        d.setVarFlag('CCACHE_DISABLE', 'export', True)
> +
>      # Handle PACKAGECONFIG
>      #
>      # These take the form:
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index a8a1665..1bb66ad 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -420,9 +420,6 @@ export PATH
>  ##################################################################
>  
>  CCACHE ??= ""
> -# Disable ccache explicitly if CCACHE is null since gcc may be a symlink
> -# of ccache some distributions (e.g., Fedora 17).
> -export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}"
>  # Assign CCACHE_DIR a default value to fix a bug of ccache 3.1.7,
>  # since it would always create CCACHE_DIR/.ccache even if
>  # CCACHE_DISABLE = 1.





  reply	other threads:[~2012-07-22  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21 11:55 [PATCH] bitbake: do not set CCACHE_DISABLE=0 Enrico Scholz
2012-07-22  8:41 ` Richard Purdie [this message]
2012-07-22  9:39   ` Enrico Scholz
2012-07-22 10:32     ` Richard Purdie
2012-07-22 11:03       ` Enrico Scholz
2012-07-22 11:39         ` Richard Purdie
2012-07-22 19:38           ` Enrico Scholz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342946469.21788.54.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox