From 0e0dcf2c7ec054f1b30629e275f53f56039b8257 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 14 Aug 2017 22:12:36 +0200 Subject: 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' --- src/libutil/logging.hh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/libutil') 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 - 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 -void Activity::progress(const Args & ... args) +void Activity::progress(const Args & ... args) const { Event ev; ev.type = evProgress; -- cgit 1.4.1