aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-05-25 16:38:29 +0200
committerThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-05-25 16:38:29 +0200
commitd16a1994fb6048d4ea48090c5aabafb7ad89c84f (patch)
tree5aeba4aaf2e357acbb3305be297327df547fd256 /src/libstore
parent6e4570234d5ac63a9483fb7f7aabaa1d17561a3a (diff)
Properly report build errors on chrooted stores
When encountering a build error, Nix moves the output paths out of the chroot into their final location (for “easier debugging of build failures”). However this was broken for chroot stores as it was moving it to the _logical_ location, not the _physical_ one. Fix it by moving to the physical (_real_) location. Fix https://github.com/NixOS/nix/issues/8395
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build/local-derivation-goal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 05d6685da..b0289ac75 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -357,7 +357,7 @@ bool LocalDerivationGoal::cleanupDecideWhetherDiskFull()
for (auto & [_, status] : initialOutputs) {
if (!status.known) continue;
if (buildMode != bmCheck && status.known->isValid()) continue;
- auto p = worker.store.printStorePath(status.known->path);
+ auto p = worker.store.toRealPath(status.known->path);
if (pathExists(chrootRootDir + p))
renameFile((chrootRootDir + p), p);
}