about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-14T20·12+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-16T18·56+0200
commit0e0dcf2c7ec054f1b30629e275f53f56039b8257 (patch)
tree10dc034fe2ff6a5860f74eae3b22673e08d1191e /src/libutil
parentc36467ad2e2e27d04e681144e0e10417c53c10c1 (diff)
Progress indicator: Unify "copying" and "substituting"
They're the same thing after all.

Example:

  $ nix build --store local?root=/tmp/nix nixpkgs.firefox-unwrapped
  [0/1 built, 49/98 copied, 16.3/92.8 MiB DL, 55.8/309.2 MiB copied] downloading 'https://cache.nixos.org/nar/0pl9li1jigcj2dany47hpmn0r3r48wc4nz48v5mqhh426lgz3bz6.nar.xz'
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/logging.hh11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index 7633408ead0e..f3ff099f0cec 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -18,6 +18,7 @@ typedef enum {
     actCopyPath = 100,
     actDownload = 101,
     actRealise = 102,
+    actCopyPaths = 103,
 } ActivityType;
 
 class Activity
@@ -32,7 +33,7 @@ public:
     ~Activity();
 
     template<typename... Args>
-    void progress(const Args & ... args);
+    void progress(const Args & ... args) const;
 };
 
 typedef enum {
@@ -40,12 +41,6 @@ typedef enum {
     evBuildStarted = 1,
     evBuildOutput = 2,
     evBuildFinished = 3,
-    evSubstitutionCreated = 8,
-    evSubstitutionStarted = 9,
-    evSubstitutionFinished = 10,
-
-    evCopyStarted = 100,
-    evCopyProgress = 101,
 
     evStartActivity = 1000,
     evStopActivity = 1001,
@@ -152,7 +147,7 @@ void warnOnce(bool & haveWarned, const FormatOrString & fs);
 void writeToStderr(const string & s);
 
 template<typename... Args>
-void Activity::progress(const Args & ... args)
+void Activity::progress(const Args & ... args) const
 {
     Event ev;
     ev.type = evProgress;