From 630ae0c9d7f65a2d6bef85a5194b4d704e54eded Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 Feb 2005 13:48:46 +0000 Subject: * nix-build: use an indirection scheme to make it easier for users to get rid of GC roots. Nix-build places a symlink `result' in the current directory. Previously, removing that symlink would not remove the store path being linked to as a GC root. Now, the GC root created by nix-build is actually a symlink in `/nix/var/nix/gcroots/auto' to `result'. So if that symlink is removed the GC root automatically becomes invalid (since it can no longer be resolved). The root itself is not automatically removed - the garbage collector should delete dangling roots. --- src/libutil/util.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 104e3f2651..d9d5a7cdfc 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -84,6 +84,8 @@ bool pathExists(const Path & path); in any way canonicalised. */ Path readLink(const Path & path); +bool isLink(const Path & path); + /* Read the contents of a directory. The entries `.' and `..' are removed. */ Strings readDirectory(const Path & path); -- cgit 1.4.1