From a9c4f66cfb1618833cc70ceaf13733730b634193 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Dec 2006 02:18:46 +0000 Subject: * Allow unprivileged users to run the garbage collector and to do `nix-store --delete'. But unprivileged users are not allowed to ignore liveness. * `nix-store --delete --ignore-liveness': ignore the runtime roots as well. --- src/nix-store/main.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/nix-store') diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc index eb037bda19..701e839742 100644 --- a/src/nix-store/main.cc +++ b/src/nix-store/main.cc @@ -3,7 +3,6 @@ #include "globals.hh" #include "misc.hh" -#include "gc.hh" #include "archive.hh" #include "shared.hh" #include "dotgraph.hh" @@ -573,7 +572,7 @@ static void opGC(Strings opFlags, Strings opArgs) PathSet result; PrintFreed freed(action == gcDeleteDead || action == gcReturnDead, action == gcReturnDead); - collectGarbage(action, PathSet(), false, result, freed.bytesFreed); + store->collectGarbage(action, PathSet(), false, result, freed.bytesFreed); if (action != gcDeleteDead) { for (PathSet::iterator i = result.begin(); i != result.end(); ++i) @@ -601,7 +600,7 @@ static void opDelete(Strings opFlags, Strings opArgs) PathSet dummy; PrintFreed freed(true, false); - collectGarbage(gcDeleteSpecific, pathsToDelete, ignoreLiveness, + store->collectGarbage(gcDeleteSpecific, pathsToDelete, ignoreLiveness, dummy, freed.bytesFreed); } -- cgit 1.4.1