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/store-api.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index cbbacc12c92a..053bece7a3a3 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -133,6 +133,12 @@ public: no deriver has been set. */ virtual Path queryDeriver(const Path & path) = 0; + /* Return all currently valid derivations that have `path' as an + output. (Note that the result of `queryDeriver()' is the + derivation that was actually used to produce `path', which may + not exist anymore.) */ + virtual PathSet queryValidDerivers(const Path & path) = 0; + /* Query the outputs of the derivation denoted by `path'. */ virtual PathSet queryDerivationOutputs(const Path & path) = 0; -- cgit 1.4.1