diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-06-10T14·17+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-06-10T14·17+0200 |
commit | b65875f8595ba6d72c6d6a5de2eba4e9f3c9b6f5 (patch) | |
tree | 2fba1f572e7381cefe9f8f9e5fd21ad28a776a29 /src/libstore/build.cc | |
parent | f90e9b65d67023d0deb158b87654ac692066552f (diff) |
Export outputPaths function
This is useful for the new hydra-queue-runner.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 5bd745454abe..21bf7167e523 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1187,15 +1187,6 @@ void DerivationGoal::inputsRealised() } -PathSet outputPaths(const DerivationOutputs & outputs) -{ - PathSet paths; - foreach (DerivationOutputs::const_iterator, i, outputs) - paths.insert(i->second.path); - return paths; -} - - static bool canBuildLocally(const string & platform) { return platform == settings.thisSystem @@ -1247,7 +1238,7 @@ void DerivationGoal::tryToBuild() can't acquire the lock, then continue; hopefully some other goal can start a build, and if not, the main loop will sleep a few seconds and then retry this goal. */ - if (!outputLocks.lockPaths(outputPaths(drv.outputs), "", false)) { + if (!outputLocks.lockPaths(outputPaths(drv), "", false)) { worker.waitForAWhile(shared_from_this()); return; } @@ -1268,7 +1259,7 @@ void DerivationGoal::tryToBuild() return; } - missingPaths = outputPaths(drv.outputs); + missingPaths = outputPaths(drv); if (buildMode != bmCheck) foreach (PathSet::iterator, i, validPaths) missingPaths.erase(*i); |