From: Michael Tremer Date: Mon, 27 Jan 2025 17:40:47 +0000 (+0000) Subject: build: Ensure the ccache directory exists or create it X-Git-Tag: 0.9.30~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb789d450c320bea863dbb345cd1bcc885cc63c;p=pakfire.git build: Ensure the ccache directory exists or create it Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/build.c b/src/pakfire/build.c index 12887f77..10eb47ff 100644 --- a/src/pakfire/build.c +++ b/src/pakfire/build.c @@ -1884,6 +1884,14 @@ static int pakfire_build_setup_ccache(struct pakfire_build* build) { if (r) return r; + // Ensure the directory exist + r = pakfire_mkdir(build->ccache_path, 0755); + if (r < 0) { + ERROR(build->ctx, "Could not create ccache %s: %s\n", + build->ccache_path, strerror(-r)); + return r; + } + // Bind-mount the directory into the jail r = pakfire_jail_bind(build->jail, build->ccache_path, CCACHE_DIR, MS_NOSUID|MS_NOEXEC|MS_NODEV);