about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-25T16·04+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-25T16·04+0200
commit0ac35b67b8035ad1166df3fb199590bc346d71f2 (patch)
treeee26ea6fc3ef46a056e8adfa17383f844c8b410a /src/libstore/build.cc
parentc137c0a5ebc0d58c53f86986ab66967ac8629cbe (diff)
Allow derivations to update the build phase
So the progress bar can show

  [1/0/1 built, 0.0 MiB DL] building hello-2.10 (configuring): checking whether pread is declared without a macro... yes
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index cb67d7a6c144..59013c0349b8 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3325,6 +3325,11 @@ void DerivationGoal::flushLine()
                     i->second.progress(json.value("done", 0), json.value("expected", 0), json.value("running", 0), json.value("failed", 0));
             }
 
+            else if (action == "setPhase") {
+                std::string phase = json["phase"];
+                act->result(resSetPhase, phase);
+            }
+
         } catch (std::exception & e) {
             printError("bad log message from builder: %s", e.what());
         }