about summary refs log tree commit diff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index 1759f521cc29..85197adcf0db 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -46,8 +46,11 @@ Path findOutput(const Derivation & drv, string id)
 
 
 void queryMissing(const PathSet & targets,
-    PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown)
+    PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown,
+    unsigned long long & downloadSize)
 {
+    downloadSize = 0;
+    
     PathSet todo(targets.begin(), targets.end()), done;
 
     while (!todo.empty()) {
@@ -86,6 +89,7 @@ void queryMissing(const PathSet & targets,
             SubstitutablePathInfo info;
             if (store->querySubstitutablePathInfo(p, info)) {
                 willSubstitute.insert(p);
+                downloadSize += info.downloadSize;
                 todo.insert(info.references.begin(), info.references.end());
             } else
                 unknown.insert(p);