hydra-queue-runner: Write GC roots for outputs paths

We lost this behaviour somewhere. So build outputs could be GC'ed when
running the collector with --option gc-keep-outputs false.
This commit is contained in:
Eelco Dolstra
2017-10-12 18:55:38 +02:00
parent eb7631fb9d
commit 45b138373b
4 changed files with 12 additions and 0 deletions

View File

@ -263,6 +263,9 @@ State::StepResult State::doBuildStep(nix::ref<Store> destStore,
assert(stepNr);
for (auto & path : step->drv.outputPaths())
writeFile(rootsDir + "/" + baseNameOf(path), "");
/* Register success in the database for all Build objects that
have this step as the top-level step. Since the queue
monitor thread may be creating new referring Builds