about summary refs log tree commit diff
path: root/src/build-remote
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-24T12·47+0200
committerEelco Dolstra <edolstra@gmail.com>2017-10-24T12·47+0200
commit96051dd057d46d5953b2fbe3de67269d175306dc (patch)
tree832bdd7bdbd63fee747838d35a014b9f9451d811 /src/build-remote
parentbe220702a75427b80258a92d1ed8c4573c1478fa (diff)
More progress indicator improvements
Fixes #1599.
Diffstat (limited to 'src/build-remote')
-rw-r--r--src/build-remote/build-remote.cc13
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);
         }