guix-commits
[Top][All Lists]
Advanced

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

91/118: Use regular file GC roots if possible


From: Ludovic Courtès
Subject: 91/118: Use regular file GC roots if possible
Date: Tue, 19 May 2015 14:45:54 +0000

civodul pushed a commit to branch nix
in repository guix.

commit aa98ba506739b885b3ce0b392dade5e1e1bb07f7
Author: Eelco Dolstra <address@hidden>
Date:   Wed Aug 13 17:44:41 2014 +0200

    Use regular file GC roots if possible
    
    This makes hydra-eval-jobs create roots as regular files. See
    1c208f2b7ef8ffb5e6d435d703dad83223a67bd6.
---
 nix/libstore/gc.cc |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index 00bf152..4babea4 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -115,7 +115,10 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath,
                     % gcRoot % rootsDir);
         }
 
-        makeSymlink(gcRoot, storePath);
+        if (baseNameOf(gcRoot) == baseNameOf(storePath))
+            writeFile(gcRoot, "");
+        else
+            makeSymlink(gcRoot, storePath);
     }
 
     /* Check that the root can be found by the garbage collector.



reply via email to

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