From 2611ac04454d48c5067667e1722bcbeaf2c4d3b1 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sun, 13 Jun 2021 22:30:47 +0300 Subject: [PATCH] Better naming of the cache directory This is microdnf, not yum. Normal dnf uses /var/cache/dnf. It is not a good idea to reuse it. But there is no need to use /var/cache/yum, at least in ROSA where this package did not exist before. Naming cache directory as "microdnf" allows to own it properly in the RPM package. --- dnf/dnf-main.c | 2 +- microdnf.spec | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dnf/dnf-main.c b/dnf/dnf-main.c index 661dfee..f26f36e 100644 --- a/dnf/dnf-main.c +++ b/dnf/dnf-main.c @@ -272,7 +272,7 @@ context_new (void) { DnfContext *ctx = dnf_context_new (); -#define CACHEDIR "/var/cache/yum" +#define CACHEDIR "/var/cache/microdnf" dnf_context_set_cache_dir (ctx, CACHEDIR"/metadata"); dnf_context_set_solv_dir (ctx, CACHEDIR"/solv"); dnf_context_set_lock_dir (ctx, CACHEDIR"/lock"); diff --git a/microdnf.spec b/microdnf.spec index 81d8185..bf19190 100644 --- a/microdnf.spec +++ b/microdnf.spec @@ -42,6 +42,7 @@ minimal environment possible so you can build up to exactly what you need. %install %meson_install +mkdir -p %{buildroot}/var/cache/microdnf %check %meson_test @@ -51,5 +52,6 @@ minimal environment possible so you can build up to exactly what you need. %doc README.md %{_mandir}/man8/microdnf.8* %{_bindir}/%{name} +%dir /var/cache/microdnf %changelog