From: Michael Tremer Date: Tue, 6 Apr 2021 15:52:42 +0000 (+0000) Subject: pakfire: Set cache path depending on distribution X-Git-Tag: 0.9.28~1285^2~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ffc44caa1c1f4f7248b55fcf7b1ebf8128e2fc;p=pakfire.git pakfire: Set cache path depending on distribution Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/pakfire.c b/src/libpakfire/pakfire.c index e37d4fdaf..7fe81c915 100644 --- a/src/libpakfire/pakfire.c +++ b/src/libpakfire/pakfire.c @@ -508,9 +508,6 @@ PAKFIRE_EXPORT int pakfire_create(Pakfire* pakfire, const char* path, const char // Set path snprintf(p->path, sizeof(p->path) - 1, "%s", path); - // Set cache path - snprintf(p->cache_path, sizeof(p->cache_path) - 1, "%s", CACHE_PATH); - // Set architecture snprintf(p->arch, sizeof(p->arch) - 1, "%s", arch); @@ -536,6 +533,10 @@ PAKFIRE_EXPORT int pakfire_create(Pakfire* pakfire, const char* path, const char if (r) goto ERROR; + // Set cache path + snprintf(p->cache_path, sizeof(p->cache_path) - 1, + "%s/%s/%s", CACHE_PATH, p->distro.id, p->distro.version_id); + // Mount filesystems r = pakfire_mount(p); if (r)