diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-20 00:27:25 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-20 00:27:25 +0100 |
commit | 9de6bc5d05027363f968c20e53e8c3d5aa34f8b4 (patch) | |
tree | bb299b4c0dd936adb842dd58ab1b230b02db94ed /src/libmain | |
parent | bf3725da2a1e4e91fc34b5faeb55bb3c02f68674 (diff) |
nix-store -r: Add ‘--ignore-unknown’ flag
This flag causes paths that do not have a known substitute to be
quietly ignored. This is mostly useful for Charon, allowing it to
speed up deployment by letting a machine use substitutes for all
substitutable paths, instead of uploading them. The latter is
frequently faster, e.g. if the target machine has a fast Internet
connection while the source machine is on a slow ADSL line.
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 7 | ||||
-rw-r--r-- | src/libmain/shared.hh | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 9e5964acf..2cf5b08df 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -47,7 +47,14 @@ void printMissing(StoreAPI & store, const PathSet & paths) unsigned long long downloadSize, narSize; PathSet willBuild, willSubstitute, unknown; queryMissing(store, paths, willBuild, willSubstitute, unknown, downloadSize, narSize); + printMissing(willBuild, willSubstitute, unknown, downloadSize, narSize); +} + +void printMissing(const PathSet & willBuild, + const PathSet & willSubstitute, const PathSet & unknown, + unsigned long long downloadSize, unsigned long long narSize) +{ if (!willBuild.empty()) { printMsg(lvlInfo, format("these derivations will be built:")); foreach (PathSet::iterator, i, willBuild) diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh index b054b0717..ff89e8638 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/shared.hh @@ -30,6 +30,10 @@ void printGCWarning(); void printMissing(StoreAPI & store, const PathSet & paths); +void printMissing(const PathSet & willBuild, + const PathSet & willSubstitute, const PathSet & unknown, + unsigned long long downloadSize, unsigned long long narSize); + template<class N> N getIntArg(const string & opt, Strings::iterator & i, const Strings::iterator & end) { |