about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-07T14·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-07T14·32+0000
commitfbc434ee4c39e7516f3634371442899864786584 (patch)
tree9ea7e2d90f78fa6b100c35c135822b984c408882 /src/libstore/gc.cc
parent450c358e2055488897349bf50951cce16ad9bc90 (diff)
* `nix-store -qb' to query derivation environment bindings. Useful
  for finding build-time dependencies (possibly after a build).  E.g.,

    $ nix-store -qb aterm $(nix-store -qd $(which strc))
    /nix/store/jw7c7s65n1gwhxpn35j9rgcci6ilzxym-aterm-2.3.1

* Arguments to nix-store can be files within store objects, e.g.,
  /nix/store/jw7c...-aterm-2.3.1/bin/baffle.

* Idem for garbage collector roots.

Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 6f09e9cb78..020712368f 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -60,7 +60,7 @@ void createSymlink(const Path & link, const Path & target, bool careful)
 
     /* Remove the old symlink. */
     if (pathExists(link)) {
-        if (careful && (!isLink(link) || !isStorePath(readLink(link))))
+        if (careful && (!isLink(link) || !isInStore(readLink(link))))
             throw Error(format("cannot create symlink `%1%'; already exists") % link);
         unlink(link.c_str());
     }
@@ -250,10 +250,10 @@ static void findRoots(const Path & path, bool recurseSymlinks,
         string target = readLink(path);
         Path target2 = absPath(target, dirOf(path));
 
-        if (isStorePath(target2)) {
+        if (isInStore(target2)) {
             debug(format("found root `%1%' in `%2%'")
                 % target2 % path);
-            roots.insert(target2);
+            roots.insert(toStorePath(target2));
         }
 
         else if (recurseSymlinks) {