aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc18
-rw-r--r--src/libmain/shared.hh11
2 files changed, 17 insertions, 12 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 81fb6b05a..d41e772e9 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -33,25 +33,25 @@ void printGCWarning()
}
-void printMissing(ref<Store> store, const PathSet & paths, Verbosity lvl)
+void printMissing(ref<Store> store, const std::vector<StorePathWithOutputs> & paths, Verbosity lvl)
{
unsigned long long downloadSize, narSize;
- PathSet willBuild, willSubstitute, unknown;
+ StorePathSet willBuild, willSubstitute, unknown;
store->queryMissing(paths, willBuild, willSubstitute, unknown, downloadSize, narSize);
printMissing(store, willBuild, willSubstitute, unknown, downloadSize, narSize, lvl);
}
-void printMissing(ref<Store> store, const PathSet & willBuild,
- const PathSet & willSubstitute, const PathSet & unknown,
+void printMissing(ref<Store> store, const StorePathSet & willBuild,
+ const StorePathSet & willSubstitute, const StorePathSet & unknown,
unsigned long long downloadSize, unsigned long long narSize, Verbosity lvl)
{
if (!willBuild.empty()) {
printMsg(lvl, "these derivations will be built:");
- Paths sorted = store->topoSortPaths(willBuild);
+ auto sorted = store->topoSortPaths(willBuild);
reverse(sorted.begin(), sorted.end());
for (auto & i : sorted)
- printMsg(lvl, fmt(" %s", i));
+ printMsg(lvl, fmt(" %s", store->printStorePath(i)));
}
if (!willSubstitute.empty()) {
@@ -59,14 +59,14 @@ void printMissing(ref<Store> store, const PathSet & willBuild,
downloadSize / (1024.0 * 1024.0),
narSize / (1024.0 * 1024.0)));
for (auto & i : willSubstitute)
- printMsg(lvl, fmt(" %s", i));
+ printMsg(lvl, fmt(" %s", store->printStorePath(i)));
}
if (!unknown.empty()) {
printMsg(lvl, fmt("don't know how to build these paths%s:",
(settings.readOnlyMode ? " (may be caused by read-only store access)" : "")));
for (auto & i : unknown)
- printMsg(lvl, fmt(" %s", i));
+ printMsg(lvl, fmt(" %s", store->printStorePath(i)));
}
}
@@ -237,7 +237,7 @@ bool LegacyArgs::processArgs(const Strings & args, bool finish)
void parseCmdLine(int argc, char * * argv,
std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg)
{
- parseCmdLine(baseNameOf(argv[0]), argvToStrings(argc, argv), parseArg);
+ parseCmdLine(std::string(baseNameOf(argv[0])), argvToStrings(argc, argv), parseArg);
}
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index 8e4861232..b49574652 100644
--- a/src/libmain/shared.hh
+++ b/src/libmain/shared.hh
@@ -3,6 +3,7 @@
#include "util.hh"
#include "args.hh"
#include "common-args.hh"
+#include "path.hh"
#include <signal.h>
@@ -37,11 +38,15 @@ void printVersion(const string & programName);
void printGCWarning();
class Store;
+struct StorePathWithOutputs;
-void printMissing(ref<Store> store, const PathSet & paths, Verbosity lvl = lvlInfo);
+void printMissing(
+ ref<Store> store,
+ const std::vector<StorePathWithOutputs> & paths,
+ Verbosity lvl = lvlInfo);
-void printMissing(ref<Store> store, const PathSet & willBuild,
- const PathSet & willSubstitute, const PathSet & unknown,
+void printMissing(ref<Store> store, const StorePathSet & willBuild,
+ const StorePathSet & willSubstitute, const StorePathSet & unknown,
unsigned long long downloadSize, unsigned long long narSize, Verbosity lvl = lvlInfo);
string getArg(const string & opt,