diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-17T14·31+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-17T14·31+0000 |
commit | bdf089f46362b8c9defefa0a14e3198582e12818 (patch) | |
tree | 08ca2824d09cee5b00cbf9b9fc9294f326120598 /src/libstore/misc.cc | |
parent | 06699d4219019182d9e45ebc613ae1a1df23f257 (diff) |
* Before a build, show the disk space that the downloaded store paths
will approximately require.
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r-- | src/libstore/misc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index d52dd6346c7a..01d6a97ae6fb 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -48,9 +48,9 @@ Path findOutput(const Derivation & drv, string id) void queryMissing(const PathSet & targets, PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown, - unsigned long long & downloadSize) + unsigned long long & downloadSize, unsigned long long & narSize) { - downloadSize = 0; + downloadSize = narSize = 0; PathSet todo(targets.begin(), targets.end()), done; @@ -88,6 +88,7 @@ void queryMissing(const PathSet & targets, if (store->querySubstitutablePathInfo(p, info)) { willSubstitute.insert(p); downloadSize += info.downloadSize; + narSize += info.narSize; todo.insert(info.references.begin(), info.references.end()); } else unknown.insert(p); |