[gnome-builder] flatpak: use appropriate ccache dir for builds



commit 4844b0cb7adf72e41ff7e5cb264296576a856959
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 23 13:21:00 2018 -0800

    flatpak: use appropriate ccache dir for builds
    
    This fixes things to use a CCACHE_DIR from within the state-dir. That
    increases the likelihood that we'll get ccache hits for dependencies
    built in separate projects.
    
    Fixes #357

 src/plugins/flatpak/gbp-flatpak-runtime.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime.c b/src/plugins/flatpak/gbp-flatpak-runtime.c
index 33f5d876f..81488550c 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime.c
@@ -189,7 +189,11 @@ gbp_flatpak_runtime_create_launcher (IdeRuntime  *runtime,
        *
        * See https://bugzilla.gnome.org/show_bug.cgi?id=780153
        */
-      ccache_dir = g_build_filename (project_path, ".flatpak-builder", "ccache", NULL);
+      ccache_dir = g_build_filename (g_get_user_cache_dir (),
+                                     ide_get_program_name (),
+                                     "flatpak-builder",
+                                     "ccache",
+                                     NULL);
       ide_subprocess_launcher_setenv (ret, "CCACHE_DIR", ccache_dir, FALSE);
 
       if (!dzl_str_empty0 (project_path))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]