Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] ccache: fix initial setup failure
@ 2018-08-28  1:23 Danomi Manchego
  2019-03-16 21:34 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Danomi Manchego @ 2018-08-28  1:23 UTC (permalink / raw)
  To: buildroot

The BR2_CCACHE_INITIAL_SETUP can fail if CCACHE_DISABLE is defined in the
environment, because ccache refuses to create a ccache.conf file when
caching is disabled.  To avoid this failure, we unset CCACHE_DISABLE prior
to doing any initial cache setup, just on the call setting up the initial
config.  The rest of the build can proceed with CCACHE_DISABLE set, if the
user wishes it so.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
 package/ccache/ccache.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
index 9a11d46..6c83a1c 100644
--- a/package/ccache/ccache.mk
+++ b/package/ccache/ccache.mk
@@ -55,7 +55,7 @@ BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP))
 ifneq ($(BR_CCACHE_INITIAL_SETUP),)
 define HOST_CCACHE_DO_INITIAL_SETUP
 	@$(call MESSAGE,"Applying initial settings")
-	$(CCACHE) $(BR_CCACHE_INITIAL_SETUP)
+	unset CCACHE_DISABLE; $(CCACHE) $(BR_CCACHE_INITIAL_SETUP)
 	$(CCACHE) -s
 endef
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] ccache: fix initial setup failure
  2018-08-28  1:23 [Buildroot] [PATCH 1/1] ccache: fix initial setup failure Danomi Manchego
@ 2019-03-16 21:34 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2019-03-16 21:34 UTC (permalink / raw)
  To: buildroot

Danomi, All,

On 2018-08-27 21:23 -0400, Danomi Manchego spake thusly:
> The BR2_CCACHE_INITIAL_SETUP can fail if CCACHE_DISABLE is defined in the
> environment, because ccache refuses to create a ccache.conf file when
> caching is disabled.  To avoid this failure, we unset CCACHE_DISABLE prior
> to doing any initial cache setup, just on the call setting up the initial
> config.  The rest of the build can proceed with CCACHE_DISABLE set, if the
> user wishes it so.

Although I do undersand the explanations, I don't understand why a use
would export CCACHE_DISABLE in their environment, thereby explicitly
telling ccache to not cache or use the cache, and at the same time
explicitly enable ccache in Buildroot and asking it to prepare a
cache to use it...

That does not make sense to me.

It would be like the user would export an http_proxy environment
variable with an invalid proxy, and us trying to work-around that.

Regards,
Yann E. MORIN.

> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
> ---
>  package/ccache/ccache.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
> index 9a11d46..6c83a1c 100644
> --- a/package/ccache/ccache.mk
> +++ b/package/ccache/ccache.mk
> @@ -55,7 +55,7 @@ BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP))
>  ifneq ($(BR_CCACHE_INITIAL_SETUP),)
>  define HOST_CCACHE_DO_INITIAL_SETUP
>  	@$(call MESSAGE,"Applying initial settings")
> -	$(CCACHE) $(BR_CCACHE_INITIAL_SETUP)
> +	unset CCACHE_DISABLE; $(CCACHE) $(BR_CCACHE_INITIAL_SETUP)
>  	$(CCACHE) -s
>  endef
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-16 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28  1:23 [Buildroot] [PATCH 1/1] ccache: fix initial setup failure Danomi Manchego
2019-03-16 21:34 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox