forked from lix-project/lix
* Get rid of some superfluous error messages if a substituter fails.
* Say "fetch" instead of "substitute".
This commit is contained in:
parent
216440b3ff
commit
b1eb8f4249
|
@ -65,7 +65,7 @@ void printMissing(StoreAPI & store, const PathSet & paths)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!willSubstitute.empty()) {
|
if (!willSubstitute.empty()) {
|
||||||
printMsg(lvlInfo, format("these paths will be downloaded/copied (%.2f MiB download, %.2f MiB unpacked):")
|
printMsg(lvlInfo, format("these paths will be fetched (%.2f MiB download, %.2f MiB unpacked):")
|
||||||
% (downloadSize / (1024.0 * 1024.0))
|
% (downloadSize / (1024.0 * 1024.0))
|
||||||
% (narSize / (1024.0 * 1024.0)));
|
% (narSize / (1024.0 * 1024.0)));
|
||||||
foreach (PathSet::iterator, i, willSubstitute)
|
foreach (PathSet::iterator, i, willSubstitute)
|
||||||
|
|
|
@ -2202,9 +2202,7 @@ void SubstitutionGoal::tryNext()
|
||||||
if (subs.size() == 0) {
|
if (subs.size() == 0) {
|
||||||
/* None left. Terminate this goal and let someone else deal
|
/* None left. Terminate this goal and let someone else deal
|
||||||
with it. */
|
with it. */
|
||||||
printMsg(lvlError,
|
debug(format("path `%1%' is required, but there is no substituter that can build it") % storePath);
|
||||||
format("path `%1%' is required, but there is no substituter that can build it")
|
|
||||||
% storePath);
|
|
||||||
amDone(ecFailed);
|
amDone(ecFailed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2235,8 +2233,7 @@ void SubstitutionGoal::referencesValid()
|
||||||
trace("all references realised");
|
trace("all references realised");
|
||||||
|
|
||||||
if (nrFailed > 0) {
|
if (nrFailed > 0) {
|
||||||
printMsg(lvlError,
|
debug(format("some references of path `%1%' could not be realised") % storePath);
|
||||||
format("some references of path `%1%' could not be realised") % storePath);
|
|
||||||
amDone(ecFailed);
|
amDone(ecFailed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2289,9 +2286,7 @@ void SubstitutionGoal::tryToRun()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printMsg(lvlInfo,
|
printMsg(lvlInfo, format("fetching path `%1%'...") % storePath);
|
||||||
format("substituting path `%1%' using substituter `%2%'")
|
|
||||||
% storePath % sub);
|
|
||||||
|
|
||||||
logPipe.create();
|
logPipe.create();
|
||||||
|
|
||||||
|
@ -2367,19 +2362,15 @@ void SubstitutionGoal::finished()
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (!statusOk(status))
|
if (!statusOk(status))
|
||||||
throw SubstError(format("builder for `%1%' %2%")
|
throw SubstError(format("fetching path `%1%' %2%")
|
||||||
% storePath % statusToString(status));
|
% storePath % statusToString(status));
|
||||||
|
|
||||||
if (!pathExists(storePath))
|
if (!pathExists(storePath))
|
||||||
throw SubstError(
|
throw SubstError(format("substitute did not produce path `%1%'") % storePath);
|
||||||
format("substitute did not produce path `%1%'")
|
|
||||||
% storePath);
|
|
||||||
|
|
||||||
} catch (SubstError & e) {
|
} catch (SubstError & e) {
|
||||||
|
|
||||||
printMsg(lvlInfo,
|
printMsg(lvlInfo, e.msg());
|
||||||
format("substitution of path `%1%' using substituter `%2%' failed: %3%")
|
|
||||||
% storePath % sub % e.msg());
|
|
||||||
|
|
||||||
if (printBuildTrace) {
|
if (printBuildTrace) {
|
||||||
printMsg(lvlError, format("@ substituter-failed %1% %2% %3%")
|
printMsg(lvlError, format("@ substituter-failed %1% %2% %3%")
|
||||||
|
|
Loading…
Reference in a new issue