diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-20T17·41+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-20T17·41+0100 |
commit | 2754a07eadfa3fe263f83830c701748bbd4c0420 (patch) | |
tree | da273ff0e02a7aa7eb00345f1f1b0ca23ba88643 /src/nix-store | |
parent | 06f62defe640517267a6a16dd222076c822f3123 (diff) |
nix-store -q --roots: Respect the gc-keep-outputs/gc-keep-derivations settings
So if a path is not garbage solely because it's reachable from a root due to the gc-keep-outputs or gc-keep-derivations settings, ‘nix-store -q --roots’ now shows that root.
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index c0da37d251da..af4f264a67e6 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -404,7 +404,8 @@ static void opQuery(Strings opFlags, Strings opArgs) foreach (Strings::iterator, i, opArgs) { PathSet paths = maybeUseOutputs(followLinksToStorePath(*i), useOutput, forceRealise); foreach (PathSet::iterator, j, paths) - computeFSClosure(*store, *j, referrers, true); + computeFSClosure(*store, *j, referrers, true, + settings.gcKeepOutputs, settings.gcKeepDerivations); } Roots roots = store->findRoots(); foreach (Roots::iterator, i, roots) |