Use regular file GC roots if possible

This makes hydra-eval-jobs create roots as regular files. See
1c208f2b7e.
This commit is contained in:
Eelco Dolstra 2014-08-13 17:44:41 +02:00
parent 5f05197df4
commit 9367046fef

View file

@ -115,7 +115,10 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath,
% gcRoot % rootsDir); % 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. /* Check that the root can be found by the garbage collector.