From 2754a07eadfa3fe263f83830c701748bbd4c0420 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 20 Dec 2012 18:41:44 +0100 Subject: nix-store -q --roots: Respect the gc-keep-outputs/gc-keep-derivations settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/libstore/remote-store.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index c97c5fbf044e..8f33b7e5cd46 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -334,6 +334,16 @@ Path RemoteStore::queryDeriver(const Path & path) } +PathSet RemoteStore::queryValidDerivers(const Path & path) +{ + openConnection(); + writeInt(wopQueryValidDerivers, to); + writeString(path, to); + processStderr(); + return readStorePaths(from); +} + + PathSet RemoteStore::queryDerivationOutputs(const Path & path) { openConnection(); -- cgit 1.4.1