Skip to content

Commit d16a199

Browse files
author
Théophane Hufschmitt
committed
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 NixOS#8395
1 parent 6e45702 commit d16a199

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstore/build/local-derivation-goal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ bool LocalDerivationGoal::cleanupDecideWhetherDiskFull()
357357
for (auto & [_, status] : initialOutputs) {
358358
if (!status.known) continue;
359359
if (buildMode != bmCheck && status.known->isValid()) continue;
360-
auto p = worker.store.printStorePath(status.known->path);
360+
auto p = worker.store.toRealPath(status.known->path);
361361
if (pathExists(chrootRootDir + p))
362362
renameFile((chrootRootDir + p), p);
363363
}

0 commit comments

Comments
 (0)