mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Export outputPaths function
This is useful for the new hydra-queue-runner.
This commit is contained in:
parent
f90e9b65d6
commit
b65875f859
3 changed files with 12 additions and 11 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue