configure.ac |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit eb4027b14d035693898e3f8fa78478ff37e446d5
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Sun Jun 4 21:47:32 2023 +0300
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Mon Aug 28 22:50:36 2023 +0200

    Fix ccache cache size detection
    
    I have ccache 4.8.1 and it reports:
    
    (/home/khaled/.config/ccache/ccache.conf) max_size = 30.0 GB
    
    With a space between the number and the unit and the configure check
    with then see a unit-less 30 and will warn:
    
    ccache's cache size is less than 1GB using it is counter-productive: 
Disabling auto-ccache detection
    
    Change-Id: I12bad9204feddfe06be7207d9367586da871a5e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152592
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>
    (cherry picked from commit 45f6b03349b2626c5e75008bccd4e094f96e2769)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156209
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/configure.ac b/configure.ac
index 4ea290ad2084..6f5b60ee8360 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3319,8 +3319,9 @@ AC_SUBST(CCACHE_DEPEND_MODE)
 # sccache defaults are good enough
 if test "$CCACHE" != "" -a -z "$SCCACHE"; then
     # e.g. (/home/rene/.config/ccache/ccache.conf) max_size = 20.0G
+    # or (...) max_size = 20.0 G
     # -p works with both 4.2 and 4.4
-    ccache_size_msg=$([$CCACHE -p | $AWK /max_size/'{ print $4 }' | sed -e 
's/\.[0-9]*//'])
+    ccache_size_msg=$([$CCACHE -p | $AWK /max_size/'{ print $4 $5 }' | sed -e 
's/\.[0-9]*//'])
     ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
     if test "$ccache_size" = ""; then
         ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')

Reply via email to