mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
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'
This commit is contained in:
parent
c36467ad2e
commit
0e0dcf2c7e
4 changed files with 24 additions and 87 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue