From: Daan De Meyer Date: Tue, 25 Mar 2025 15:42:38 +0000 (+0100) Subject: Drop logic for using /root/.cache X-Git-Tag: v26~300^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3067210ff415fe33a6b322906347be7b3365870a;p=thirdparty%2Fmkosi.git Drop logic for using /root/.cache Let's just have root use the cache in /var/cache/mkosi to avoid accidentally leaking files into /root/.cache accidentally where it's much less likely that they'll ever get cleaned up. --- diff --git a/mkosi/user.py b/mkosi/user.py index 1550fd5aa..b4ca80a53 100644 --- a/mkosi/user.py +++ b/mkosi/user.py @@ -24,8 +24,6 @@ class INVOKING_USER: cache = Path(env) elif cls.is_regular_user(os.getuid()) and Path.home() != Path("/"): cache = Path.home() / ".cache" - elif os.getuid() == 0 and Path.cwd().is_relative_to("/root") and "XDG_SESSION_ID" in os.environ: - cache = Path("/root/.cache") else: cache = Path("/var/cache")