Revert "libstore: don’t include derivation names in build direct..."
Revert submission 3850 Reason for revert: caused multiple regressions noticed in https://git.lix.systems/lix-project/lix/issues/975 and https://git.lix.systems/lix-project/lix/issues/966 (suspected). Root cause analysis has not been done yet and this breaks Lix on Darwin on HEAD. Reverted changes: /q/submissionid:3850 Change-Id: Iee4c3f071238fa58e0e92f0bcc5584ded4a9d71f
This commit is contained in:
@@ -446,7 +446,8 @@ try {
|
||||
|
||||
/* Create a temporary directory where the build will take
|
||||
place. */
|
||||
tmpDirRoot = createTempSubdir(buildDir, std::nullopt, 0700);
|
||||
tmpDirRoot =
|
||||
createTempSubdir(buildDir, "nix-build-" + std::string(drvPath.name()), 0700);
|
||||
} catch (SysError & e) {
|
||||
/*
|
||||
* Fallback to the global tmpdir and create a safe space there
|
||||
@@ -471,7 +472,9 @@ try {
|
||||
settings.buildDir.get(),
|
||||
nixBuildsTmp
|
||||
);
|
||||
tmpDirRoot = createTempSubdir(nixBuildsTmp, std::nullopt, 0700);
|
||||
tmpDirRoot = createTempSubdir(
|
||||
nixBuildsTmp, "nix-build-" + std::string(drvPath.name()), 0700
|
||||
);
|
||||
worker.buildDirOverride = nixBuildsTmp;
|
||||
}
|
||||
/* The TOCTOU between the previous mkdir call and this open call is unavoidable due to
|
||||
|
||||
@@ -40,8 +40,8 @@ test_custom_build_dir() {
|
||||
nix-build check.nix -A failed --argstr checkBuildId $checkBuildId \
|
||||
--no-out-link --keep-failed --option build-dir "$TEST_ROOT/custom-build-dir" 2> $TEST_ROOT/log || status=$?
|
||||
[ "$status" = "100" ]
|
||||
[[ 1 == "$(count "$customBuildDir/"*)" ]]
|
||||
local buildDir="$customBuildDir/"*
|
||||
[[ 1 == "$(count "$customBuildDir/nix-build-"*)" ]]
|
||||
local buildDir="$customBuildDir/nix-build-"*
|
||||
grep $checkBuildId $buildDir/b/checkBuildId
|
||||
}
|
||||
test_custom_build_dir
|
||||
|
||||
Reference in New Issue
Block a user