all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#51427] [PATCH] nix: libstore: Do not remove unused links when deleting specific items.
@ 2021-10-27  3:49 Maxim Cournoyer
  2021-10-28 14:16 ` Ludovic Courtès
  2023-06-12 20:55 ` Felix Lechner via Guix-patches via
  0 siblings, 2 replies; 28+ messages in thread
From: Maxim Cournoyer @ 2021-10-27  3:49 UTC (permalink / raw)
  To: 51427; +Cc: Maxim Cournoyer

Deleting unused links can be a very costly operation, especially on rotative
hard drives.  As removing single store items is often used for experimentation
rather than for cleaning purposes, this change allows it to run without the
links cleanup.

* nix/libstore/gc.cc (LocalStore::collectGarbage): Do not clean up links when
the specified action is GCOptions::gcDeleteSpecific.
---
 nix/libstore/gc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index e1d0765154..7d872d8cc1 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -771,7 +771,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
     deleteGarbage(state, state.trashDir);
 
     /* Clean up the links directory. */
-    if (options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific) {
+    if (options.action == GCOptions::gcDeleteDead) {
         printMsg(lvlError, format("deleting unused links..."));
         removeUnusedLinks(state);
     }
-- 
2.33.1





^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-06-13 20:14 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27  3:49 [bug#51427] [PATCH] nix: libstore: Do not remove unused links when deleting specific items Maxim Cournoyer
2021-10-28 14:16 ` Ludovic Courtès
2021-10-31  8:50   ` Liliana Marie Prikler
2021-10-31 14:07     ` Ludovic Courtès
2021-10-31 14:39       ` Liliana Marie Prikler
2021-10-31 20:51       ` Maxim Cournoyer
2021-11-03 10:45         ` zimoun
2021-11-06 16:57         ` Ludovic Courtès
2021-11-09  4:11           ` Maxim Cournoyer
2021-11-09  4:57             ` Jack Hill
2021-11-09 12:56               ` Ludovic Courtès
2021-11-09 18:10           ` zimoun
2021-11-17 10:02             ` Ludovic Courtès
2021-11-17 11:49               ` zimoun
2022-07-18 13:57                 ` Ludovic Courtès
2022-07-18 17:03                   ` Liliana Marie Prikler
2022-07-19  8:34                     ` Ludovic Courtès
2022-07-19 18:42                       ` Liliana Marie Prikler
2022-07-19 19:25                         ` Tobias Geerinckx-Rice via Guix-patches via
2022-07-21  9:21                           ` Ludovic Courtès
2022-07-21 18:02                             ` Liliana Marie Prikler
2022-07-22 12:14                               ` Ludovic Courtès
2022-07-22 13:39                                 ` Maxime Devos
2022-07-22 23:07                                   ` Ludovic Courtès
2022-07-23  6:52                                     ` Liliana Marie Prikler
2022-07-23 10:24                                     ` Maxime Devos
2023-06-12 20:55 ` Felix Lechner via Guix-patches via
2023-06-13  4:26   ` Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.