diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-13 17:44:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-11 17:23:33 +0200 |
commit | aa98ba506739b885b3ce0b392dade5e1e1bb07f7 (patch) | |
tree | 553942fc7b4203839471c109a11b1dacade579b7 /nix/libstore/gc.cc | |
parent | 5fe5ff77800c2911c011f582d8dfa90c44d4a3a5 (diff) | |
download | guix-aa98ba506739b885b3ce0b392dade5e1e1bb07f7.tar.gz |
Use regular file GC roots if possible
This makes hydra-eval-jobs create roots as regular files. See 1c208f2b7ef8ffb5e6d435d703dad83223a67bd6.
Diffstat (limited to 'nix/libstore/gc.cc')
-rw-r--r-- | 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 00bf1526b3..4babea4a50 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. |