libstore: fix scratch output cleanup
the daemon must use real store paths, not virtual store paths. using virtual paths may inadvertently delete paths in the system nix store when a build was run on a redirected store as root, which isn't good Change-Id: Id048b236bda0e0ab1f3be6ccba0ddc1de2a3e941
This commit is contained in:
@@ -530,7 +530,9 @@ void LocalDerivationGoal::startBuilder()
|
|||||||
/* Schedule this scratch output path for automatic deletion
|
/* Schedule this scratch output path for automatic deletion
|
||||||
* if we do not cancel it, e.g. when registering the outputs.
|
* if we do not cancel it, e.g. when registering the outputs.
|
||||||
*/
|
*/
|
||||||
scratchOutputsCleaner.insert_or_assign(outputName, worker.store.printStorePath(scratchPath));
|
scratchOutputsCleaner.emplace(
|
||||||
|
outputName, worker.store.toRealPath(worker.store.printStorePath(scratchPath))
|
||||||
|
);
|
||||||
|
|
||||||
/* Substitute output placeholders with the scratch output paths.
|
/* Substitute output placeholders with the scratch output paths.
|
||||||
We'll use during the build. */
|
We'll use during the build. */
|
||||||
|
|||||||
Reference in New Issue
Block a user