* Build hooks: use nix-store --import. This prevents a redundant
scan for runtime dependencies (i.e. the local machine shouldn't do a scan that the remote machine has already done). Also pipe directly into `nix-store --import': don't use a temporary file.
This commit is contained in:
parent
6f8c96d123
commit
b682fae9d9
3 changed files with 29 additions and 22 deletions
|
|
@ -924,7 +924,14 @@ Path LocalStore::importPath(bool requireSignature, Source & source)
|
|||
|
||||
if (!isValidPath(dstPath)) {
|
||||
|
||||
PathLocks outputLock(singleton<PathSet, Path>(dstPath));
|
||||
PathLocks outputLock;
|
||||
|
||||
/* Lock the output path. But don't lock if we're being called
|
||||
from a build hook (whose parent process already acquired a
|
||||
lock on this path). */
|
||||
Strings locksHeld = tokenizeString(getEnv("NIX_HELD_LOCKS"));
|
||||
if (find(locksHeld.begin(), locksHeld.end(), dstPath) == locksHeld.end())
|
||||
outputLock.lockPaths(singleton<PathSet, Path>(dstPath));
|
||||
|
||||
if (!isValidPath(dstPath)) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue