mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
LocalBinaryCacheStore::upsertFile(): Fix race
When multiple threads try to upsert the same file, this could fail. Fixes #4667.
This commit is contained in:
parent
4638bcfb2c
commit
dd77f71afe
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,8 @@ source common.sh
|
|||
|
||||
sed -i 's/experimental-features .*/& ca-derivations ca-references/' "$NIX_CONF_DIR"/nix.conf
|
||||
|
||||
rm -rf $TEST_ROOT/binary_cache
|
||||
|
||||
export REMOTE_STORE=file://$TEST_ROOT/binary_cache
|
||||
|
||||
buildDrvs () {
|
||||
|
@ -13,6 +15,7 @@ buildDrvs () {
|
|||
}
|
||||
|
||||
# Populate the remote cache
|
||||
clearStore
|
||||
buildDrvs --post-build-hook ../push-to-store.sh
|
||||
|
||||
# Restart the build on an empty store, ensuring that we don't build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue