From fbc434ee4c39e7516f3634371442899864786584 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Feb 2005 14:32:44 +0000 Subject: * `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. --- src/libstore/gc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstore/gc.cc') diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 6f09e9cb7852..020712368f52 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) { -- cgit 1.4.1