diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build-remote/build-remote.cc | 2 | ||||
-rw-r--r-- | src/libstore/build.cc | 10 | ||||
-rw-r--r-- | src/nix/progress-bar.cc | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 92ae99e168b7..d2fac09f8432 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -196,7 +196,7 @@ int main (int argc, char * * argv) } connected: - std::cerr << "# accept\n"; + std::cerr << "# accept\n" << storeUri << "\n"; auto inputs = readStrings<PathSet>(source); auto outputs = readStrings<PathSet>(source); diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 6e3d0a3ebb22..dcc48bef770b 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -852,6 +852,9 @@ private: std::map<ActivityId, Activity> builderActivities; + /* The remote machine on which we're building. */ + std::string machineName; + public: DerivationGoal(const Path & drvPath, const StringSet & wantedOutputs, Worker & worker, BuildMode buildMode = bmNormal); @@ -1400,7 +1403,8 @@ void DerivationGoal::tryToBuild() auto started = [&]() { act = std::make_unique<Activity>(*logger, lvlInfo, actBuild, - fmt("building '%s'", drvPath), Logger::Fields{drvPath}); + fmt("building '%s'", drvPath), + Logger::Fields{drvPath, hook ? machineName : ""}); mcRunningBuilds = std::make_unique<MaintainCount<uint64_t>>(worker.runningBuilds); worker.updateProgress(); }; @@ -1691,10 +1695,10 @@ HookReply DerivationGoal::tryBuildHook() throw; } - printMsg(lvlTalkative, format("using hook to build path(s) %1%") % showPaths(missingPaths)); - hook = std::move(worker.hook); + machineName = readLine(hook->fromHook.readSide.get()); + /* Tell the hook all the inputs that have to be copied to the remote system. */ hook->sink << inputPaths; diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index 76138b2cce28..a33ea3423839 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -156,6 +156,9 @@ public: if (hasSuffix(name, ".drv")) name.resize(name.size() - 4); i->s = fmt("building " ANSI_BOLD "%s" ANSI_NORMAL, name); + auto machineName = getS(fields, 1); + if (machineName != "") + i->s += fmt(" on " ANSI_BOLD "%s" ANSI_NORMAL, machineName); } if (type == actSubstitute) { |