diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-04T10·45+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-04T10·45+0000 |
commit | f92c9a0ac585d30e245c6667cbce4b035659cb11 (patch) | |
tree | 4c9d10130d3ce67a4ca724170614f09a404e16aa /src/libstore/remote-store.cc | |
parent | 7fa338f4bac16f83b65b95fb0397b534d5ba5d5b (diff) |
* Allow unprivileged users to do `nix-store --clear-failed-paths' and
`nix-store --query-failed-paths'.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index c5d7975b521b..334ad95cf9df 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -451,6 +451,25 @@ void RemoteStore::collectGarbage(const GCOptions & options, GCResults & results) } +PathSet RemoteStore::queryFailedPaths() +{ + openConnection(); + writeInt(wopQueryFailedPaths, to); + processStderr(); + return readStorePaths(from); +} + + +void RemoteStore::clearFailedPaths(const PathSet & paths) +{ + openConnection(); + writeInt(wopClearFailedPaths, to); + writeStringSet(paths, to); + processStderr(); + readInt(from); +} + + void RemoteStore::processStderr(Sink * sink, Source * source) { unsigned int msg; |