aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-06-16 10:13:03 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-06-16 10:13:03 +0000
commitc937b736227384e6c2f4f477796fc3ce02d1229a (patch)
treef0244dfc38aa3d47398ed30c7efe021b8b3a7374
parent588cb0eade0c14acdf4a20dfec5678715cc6542e (diff)
* Show when we're blocked waiting for a lock.
-rw-r--r--src/libstore/build.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 278529bc2..ed53f48aa 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1066,7 +1066,8 @@ bool DerivationGoal::prepareBuild()
/* Obtain locks on all output paths. The locks are automatically
released when we exit this function or Nix crashes. */
/* !!! BUG: this could block, which is not allowed. */
- outputLocks.lockPaths(outputPaths(drv.outputs));
+ outputLocks.lockPaths(outputPaths(drv.outputs),
+ (format("waiting for lock on %1%") % showPaths(outputPaths(drv.outputs))).str());
/* Now check again whether the outputs are valid. This is because
another process may have started building in parallel. After
@@ -1715,10 +1716,9 @@ void SubstitutionGoal::tryToRun()
}
/* Acquire a lock on the output path. */
- PathSet lockPath;
- lockPath.insert(storePath);
outputLock = shared_ptr<PathLocks>(new PathLocks);
- outputLock->lockPaths(lockPath);
+ outputLock->lockPaths(singleton<PathSet>(storePath),
+ (format("waiting for lock on `%1%'") % storePath).str());
/* Check again whether the path is invalid. */
if (isValidPath(storePath)) {