mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
* 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.
This commit is contained in:
parent
8623256f48
commit
29cf434a35
9 changed files with 140 additions and 79 deletions
|
@ -2,6 +2,7 @@
|
|||
#define __STOREAPI_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
@ -33,6 +34,9 @@ struct Substitute
|
|||
typedef list<Substitute> Substitutes;
|
||||
|
||||
|
||||
typedef std::map<Path, Path> 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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue