guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

149/149: nix: libstore: Do not remove unused links when deleting specifi


From: guix-commits
Subject: 149/149: nix: libstore: Do not remove unused links when deleting specific items.
Date: Tue, 26 Oct 2021 23:52:46 -0400 (EDT)

apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.

commit 09416bc894e29cca066a22fb89a84384e926eee1
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Oct 26 22:09:46 2021 -0400

    nix: libstore: Do not remove unused links when deleting specific items.
    
    Deleting unused links can be a very costly operation, especially on rotative
    hard drives.  Removing single store items is often used for experimentation
    rather than for cleaning purposes, allow 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 e1d0765..7d872d8 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);
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]