diff options
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r-- | src/build-remote/build-remote.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index d2fac09f8432..419e7205372b 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -201,25 +201,29 @@ connected: auto inputs = readStrings<PathSet>(source); auto outputs = readStrings<PathSet>(source); + AutoCloseFD uploadLock = openLockFile(currentLoad + "/" + escapeUri(storeUri) + ".upload-lock", true); + { Activity act(*logger, lvlTalkative, actUnknown, fmt("waiting for the upload lock to '%s'", storeUri)); - AutoCloseFD uploadLock = openLockFile(currentLoad + "/" + escapeUri(storeUri) + ".upload-lock", true); - auto old = signal(SIGALRM, handleAlarm); alarm(15 * 60); if (!lockFile(uploadLock.get(), ltWrite, true)) printError("somebody is hogging the upload lock for '%s', continuing..."); alarm(0); signal(SIGALRM, old); + } + + { + Activity act(*logger, lvlTalkative, actUnknown, fmt("copying dependencies to '%s'", storeUri)); copyPaths(store, ref<Store>(sshStore), inputs, NoRepair, NoCheckSigs); - uploadLock = -1; } + uploadLock = -1; + BasicDerivation drv(readDerivation(store->realStoreDir + "/" + baseNameOf(drvPath))); drv.inputSrcs = inputs; - printInfo("building '%s' on '%s'", drvPath, storeUri); auto result = sshStore->buildDerivation(drvPath, drv); if (!result.success()) @@ -230,6 +234,7 @@ connected: if (!store->isValidPath(path)) missing.insert(path); if (!missing.empty()) { + Activity act(*logger, lvlTalkative, actUnknown, fmt("copying outputs from '%s'", storeUri)); setenv("NIX_HELD_LOCKS", concatStringsSep(" ", missing).c_str(), 1); /* FIXME: ugly */ copyPaths(ref<Store>(sshStore), store, missing, NoRepair, NoCheckSigs); } |