GNU bug report logs -
#51427
[PATCH] nix: libstore: Do not remove unused links when deleting specific items.
Previous Next
Full log
Message #44 received at 51427 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
On Wed, 17 Nov 2021 at 11:02, Ludovic Courtès <ludo <at> gnu.org> wrote:
> zimoun <zimon.toutoune <at> gmail.com> skribis:
>
>> I have not checked the code, maybe I should start by that. ;-) Is it not
>> possible to simply skip the deleting phase when the option ’-D’ is used?
>
> No; like I wrote, it would have the effect of not deleting anything:
After giving a look at the code, yeah it is not so simple. :-)
> https://issues.guix.gnu.org/51427#1
>
> Needs more thought…
The logic is complicated, thus adding this guard…
--8<---------------cut here---------------start------------->8---
if (options.maxFreed > 0) {
/* Clean up the links directory. */
if (options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific) {
printMsg(lvlError, format("deleting unused links..."));
removeUnusedLinks(state);
}
}
--8<---------------cut here---------------end--------------->8---
…is probably dumb. From my understanding, it should bypass the phase
’removeUnusedLinks’ when using “guix gc -D”. Well, I have not tested
it.
Cheers,
simon
This bug report was last modified 2 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.