aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-24 14:47:23 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-10-24 14:47:23 +0200
commit96051dd057d46d5953b2fbe3de67269d175306dc (patch)
tree832bdd7bdbd63fee747838d35a014b9f9451d811 /src/libstore
parentbe220702a75427b80258a92d1ed8c4573c1478fa (diff)
More progress indicator improvements
Fixes #1599.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc8
-rw-r--r--src/libstore/store-api.cc12
2 files changed, 14 insertions, 6 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index dcc48bef7..681879c6a 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1403,7 +1403,7 @@ void DerivationGoal::tryToBuild()
auto started = [&]() {
act = std::make_unique<Activity>(*logger, lvlInfo, actBuild,
- fmt("building '%s'", drvPath),
+ hook ? fmt("building '%s' on '%s'", drvPath, machineName) : fmt("building '%s'", drvPath),
Logger::Fields{drvPath, hook ? machineName : ""});
mcRunningBuilds = std::make_unique<MaintainCount<uint64_t>>(worker.runningBuilds);
worker.updateProgress();
@@ -1659,7 +1659,7 @@ HookReply DerivationGoal::tryBuildHook()
string reply;
while (true) {
string s = readLine(worker.hook->fromHook.readSide.get());
- if (handleJSONLogMessage(s, worker.act, worker.hook->activities))
+ if (handleJSONLogMessage(s, worker.act, worker.hook->activities, true))
;
else if (string(s, 0, 2) == "# ") {
reply = string(s, 2);
@@ -3270,7 +3270,7 @@ void DerivationGoal::handleChildOutput(int fd, const string & data)
if (hook && fd == hook->fromHook.readSide.get()) {
for (auto c : data)
if (c == '\n') {
- handleJSONLogMessage(currentHookLine, worker.act, hook->activities);
+ handleJSONLogMessage(currentHookLine, worker.act, hook->activities, true);
currentHookLine.clear();
} else
currentHookLine += c;
@@ -3287,7 +3287,7 @@ void DerivationGoal::handleEOF(int fd)
void DerivationGoal::flushLine()
{
- if (handleJSONLogMessage(currentLogLine, *act, builderActivities))
+ if (handleJSONLogMessage(currentLogLine, *act, builderActivities, false))
;
else {
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 3bc5e4c57..17237a035 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -565,8 +565,16 @@ void Store::buildPaths(const PathSet & paths, BuildMode buildMode)
void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
const Path & storePath, RepairFlag repair, CheckSigsFlag checkSigs)
{
- Activity act(*logger, lvlInfo, actCopyPath, fmt("copying path '%s'", storePath),
- {storePath, srcStore->getUri(), dstStore->getUri()});
+ auto srcUri = srcStore->getUri();
+ auto dstUri = dstStore->getUri();
+
+ Activity act(*logger, lvlInfo, actCopyPath,
+ srcUri == "local"
+ ? fmt("copying path '%s' to '%s'", storePath, dstUri)
+ : dstUri == "local"
+ ? fmt("copying path '%s' from '%s'", storePath, srcUri)
+ : fmt("copying path '%s' from '%s' to '%s'", storePath, srcUri, dstUri),
+ {storePath, srcUri, dstUri});
PushActivity pact(act.id);
auto info = srcStore->queryPathInfo(storePath);