]> git.ipfire.org Git - pakfire.git/commitdiff
build: Disable ccache using CCACHE_DISABLE=1
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 16:05:32 +0000 (16:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 16:05:32 +0000 (16:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index 59d4b16e5b7dcfde5d439cf87893c6f6cd692d75..4e4f1c4ad8f05925f50282ba75b983c5f2362c0b 100644 (file)
@@ -948,6 +948,14 @@ static int pakfire_build_setup_ccache(struct pakfire_build* build) {
        // Check if we want a ccache
        if (pakfire_build_has_flag(build, PAKFIRE_BUILD_DISABLE_CCACHE)) {
                DEBUG(build->pakfire, "ccache usage has been disabled for this build\n");
+
+               // Set CCACHE_DISABLE=1 so that if ccache is installed, it will disable itself
+               r = pakfire_jail_set_env(build->jail, "CCACHE_DISABLE", "1");
+               if (r) {
+                       ERROR(build->pakfire, "Could not disable ccache: %m\n");
+                       return r;
+               }
+
                return 0;
        }