From 29cf434a35d82529f56c085c9cd50858c148d086 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Dec 2006 01:31:45 +0000 Subject: * The determination of the root set should be made by the privileged process, so forward the operation. * Spam the user about GC misconfigurations (NIX-71). * findRoots: skip all roots that are unreadable - the warnings with which we spam the user should be enough. --- src/libstore/store-api.hh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 795488d17f..bda232d3d2 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -2,6 +2,7 @@ #define __STOREAPI_H #include +#include #include @@ -33,6 +34,9 @@ struct Substitute typedef list Substitutes; +typedef std::map Roots; + + class StoreAPI { public: @@ -118,6 +122,11 @@ public: In either case the permanent root is seen by the collector. */ virtual void syncWithGC() = 0; + /* Find the roots of the garbage collector. Each root is a pair + (link, storepath) where `link' is the path of the symlink + outside of the Nix store that point to `storePath'. */ + virtual Roots findRoots() = 0; + }; -- cgit 1.4.1