GNU bug report logs - #52805
[PATCH] substitute: Add a ‘--clear-cache’ option.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Sun, 26 Dec 2021 16:21:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 52805 <at> debbugs.gnu.org
Subject: [bug#52805] [PATCH] substitute: Add a ‘--clear-cache’ option.
Date: Mon, 27 Dec 2021 22:20:16 +0100
[Message part 1 (text/plain, inline)]
Hi Mathieu,

Thanks for the review!

Mathieu Othacehe 写道:
> This script is invoked by the daemon as root. In that context,
> %narinfo-cache-directory is "/var/guix/substitute/cache", 
> whereas when
> run as an user it is likely: "~/.cache/guix/substitute".

Correct.

> That would mean that users need to run "sudo guix substitute
> --clear-cache".

If they want to clear /var instead of ~/.cache, sure.

That sounds like a sane interface, if clearing ‘root’'s cache were 
the intention?  How would you even do that without sudo, 
privilege-wise?

> Moreover this script is an internal undocumented tool,
> so I'm not in favor of adding user commands to it.

OK.

The point was to have a little command I could ask other users to 
run, that's guaranteed to clear the correct directory, and doesn't 
involve a spooky rm (which saves some back-and-forth :-).

> Maybe "guix gc" would be a better place?

No, I'd rather not add yet another option to ‘guix gc’ that has 
nothing to do with GC.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.