aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-13 17:21:20 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-13 17:21:20 +0000
commit30c9f909b24d64d8fabc2bb450e03744cc69c9a0 (patch)
treea62f98931b8766fe65e802cf47b3b06ed877663e /src/libstore
parent194c66eeebdd6920716c82eeb259083d7bbd84c5 (diff)
* Print some progress info during the early GC stages.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc2
-rw-r--r--src/libstore/gc.cc8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 23cda12c0..0664a118a 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -912,7 +912,7 @@ void DerivationGoal::haveDerivation()
/* If they are all valid, then we're done. */
if (invalidOutputs.size() == 0) {
- if(! forceInputs) {
+ if(!forceInputs) {
amDone(ecSuccess);
return;
}
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 1d654cd67..9ed87d112 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -455,6 +455,7 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
/* Find the roots. Since we've grabbed the GC lock, the set of
permanent roots cannot increase now. */
+ printMsg(lvlError, format("finding garbage collector roots..."));
Roots rootMap = ignoreLiveness ? Roots() : nix::findRoots(true);
PathSet roots;
@@ -475,6 +476,7 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
/* Determine the live paths which is just the closure of the
roots under the `references' relation. */
+ printMsg(lvlError, format("computing live paths..."));
PathSet livePaths;
for (PathSet::const_iterator i = roots.begin(); i != roots.end(); ++i)
computeFSClosure(canonPath(*i), livePaths);
@@ -548,6 +550,7 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
/* Read the Nix store directory to find all currently existing
paths. */
+ printMsg(lvlError, format("reading the Nix store..."));
PathSet storePathSet;
if (action != gcDeleteSpecific) {
Paths entries = readDirectory(nixStore);
@@ -567,9 +570,14 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
which things can be deleted safely. */
/* !!! when we have multiple output paths per derivation, this
will not work anymore because we get cycles. */
+ printMsg(lvlError, format("toposorting..."));
Paths storePaths = topoSortPaths(storePathSet);
/* Try to delete store paths in the topologically sorted order. */
+ printMsg(lvlError, action == gcReturnDead
+ ? format("looking for garbage...")
+ : format("deleting garbage..."));
+
for (Paths::iterator i = storePaths.begin(); i != storePaths.end(); ++i) {
debug(format("considering deletion of `%1%'") % *i);