forked from lix-project/lix
* Print the exit code of the builder.
This commit is contained in:
parent
1610444671
commit
7de1b2a698
|
@ -251,7 +251,6 @@ void Database::close()
|
||||||
for (map<TableId, Db *>::iterator i = tables.begin();
|
for (map<TableId, Db *>::iterator i = tables.begin();
|
||||||
i != tables.end(); i++)
|
i != tables.end(); i++)
|
||||||
{
|
{
|
||||||
debug(format("closing table %1%") % i->first);
|
|
||||||
Db * db = i->second;
|
Db * db = i->second;
|
||||||
db->close(DB_NOSYNC);
|
db->close(DB_NOSYNC);
|
||||||
delete db;
|
delete db;
|
||||||
|
|
|
@ -111,9 +111,17 @@ void runProgram(const string & program,
|
||||||
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||||
if (keepFailed) {
|
if (keepFailed) {
|
||||||
msg(lvlTalkative,
|
msg(lvlTalkative,
|
||||||
format("build failed; keeping build directory `%1%'") % tmpDir);
|
format("program `%1%' failed; keeping build directory `%2%'")
|
||||||
|
% program % tmpDir);
|
||||||
delTmpDir.cancel();
|
delTmpDir.cancel();
|
||||||
}
|
}
|
||||||
throw Error("unable to build package");
|
if (WIFEXITED(status))
|
||||||
|
throw Error(format("program `%1%' failed with exit code %2%")
|
||||||
|
% program % WEXITSTATUS(status));
|
||||||
|
else if (WIFSIGNALED(status))
|
||||||
|
throw Error(format("program `%1%' failed due to signal %2%")
|
||||||
|
% program % WTERMSIG(status));
|
||||||
|
else
|
||||||
|
throw Error(format("program `%1%' died abnormally") % program);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue