Re: [OE-core] [PATCH 1/2] ccache: enable max size setup for ccache dir

2017-01-16 Thread Yannick GICQUEL
2017-01-13 15:43 GMT+01:00 Burton, Ross :
>
> On 13 January 2017 at 14:23, Yannick Gicquel 
> wrote:
>>
>> +def init_ccache():
>> +# dummy python version
>> +return
>> +
>> +init_ccache() {
>> +if [ -n "${CCACHE}" ]; then
>> +${CCACHE} -M ${CCACHE_MAX_SIZE}
>> +fi
>> +}
>> +
>> +do_compile_prepend() {
>> +init_ccache
>> +}
>
>
> That is horrible. :)

Thanks for your direct review :)

>
> Is it not possible to just pass -M[size] to ccache every time it's invoked?
> If it needs to be invoked on its own, then a do_compile[postfunc] or
> something to trim the size after a build would be neater.

I tried to pass -M option in CCACHE variable directly, but it breaks
host_gcc_version().

About cache size trimming, ccache does not support such feature. It
supports "forced cleanup", but as stated in the man page it's not
needed until user manually modify cache content. Keeping size limit ot
1GB is still possible, but as it is stored by default in TMPDIR why
doing so ? My assumption is that people who activates ccache will have
in mind it will consumes disk space (FYI, webkitgtk recipe requires
3.9GB)

Agree that using a "do_compile[prefuncs]" will be more compact than
the current proposal, i will prepare a V2 serie with this syntax.

Yannick

>
> Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] ccache: enable max size setup for ccache dir

2017-01-13 Thread Burton, Ross
On 13 January 2017 at 14:23, Yannick Gicquel 
wrote:

> +def init_ccache():
> +# dummy python version
> +return
> +
> +init_ccache() {
> +if [ -n "${CCACHE}" ]; then
> +${CCACHE} -M ${CCACHE_MAX_SIZE}
> +fi
> +}
> +
> +do_compile_prepend() {
> +init_ccache
> +}
>

That is horrible. :)

Is it not possible to just pass -M[size] to ccache every time it's
invoked?  If it needs to be invoked on its own, then a do_compile[postfunc]
or something to trim the size after a build would be neater.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core