1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

* Before a build, show the disk space that the downloaded store paths

will approximately require.
This commit is contained in:
Eelco Dolstra 2010-11-17 14:31:42 +00:00
parent 06699d4219
commit bdf089f463
11 changed files with 36 additions and 29 deletions

View file

@ -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);