Merge pull request #732 from Ma27/fix-build
Fix build against latest Nix
This commit is contained in:
commit
7b705758ec
|
@ -466,7 +466,7 @@ void State::failStep(
|
||||||
/* Remember failed paths in the database so that they
|
/* Remember failed paths in the database so that they
|
||||||
won't be built again. */
|
won't be built again. */
|
||||||
if (result.stepStatus != bsCachedFailure && result.canCache)
|
if (result.stepStatus != bsCachedFailure && result.canCache)
|
||||||
for (auto & path : step->drv.outputPaths())
|
for (auto & path : step->drv->outputPaths())
|
||||||
txn.exec_params0("insert into FailedPaths values ($1)", localStore->printStorePath(path));
|
txn.exec_params0("insert into FailedPaths values ($1)", localStore->printStorePath(path));
|
||||||
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
|
|
|
@ -258,7 +258,7 @@ unsigned int State::createBuildStep(pqxx::work & txn, time_t startTime, BuildID
|
||||||
localStore->printStorePath(step->drvPath),
|
localStore->printStorePath(step->drvPath),
|
||||||
status == bsBusy ? 1 : 0,
|
status == bsBusy ? 1 : 0,
|
||||||
startTime != 0 ? std::make_optional(startTime) : std::nullopt,
|
startTime != 0 ? std::make_optional(startTime) : std::nullopt,
|
||||||
step->drv.platform,
|
step->drv->platform,
|
||||||
status != bsBusy ? std::make_optional((int) status) : std::nullopt,
|
status != bsBusy ? std::make_optional((int) status) : std::nullopt,
|
||||||
propagatedFrom != 0 ? std::make_optional(propagatedFrom) : std::nullopt, // internal::params
|
propagatedFrom != 0 ? std::make_optional(propagatedFrom) : std::nullopt, // internal::params
|
||||||
errorMsg != "" ? std::make_optional(errorMsg) : std::nullopt,
|
errorMsg != "" ? std::make_optional(errorMsg) : std::nullopt,
|
||||||
|
@ -267,7 +267,7 @@ unsigned int State::createBuildStep(pqxx::work & txn, time_t startTime, BuildID
|
||||||
|
|
||||||
if (r.affected_rows() == 0) goto restart;
|
if (r.affected_rows() == 0) goto restart;
|
||||||
|
|
||||||
for (auto & output : step->drv.outputs)
|
for (auto & output : step->drv->outputs)
|
||||||
txn.exec_params0
|
txn.exec_params0
|
||||||
("insert into BuildStepOutputs (build, stepnr, name, path) values ($1, $2, $3, $4)",
|
("insert into BuildStepOutputs (build, stepnr, name, path) values ($1, $2, $3, $4)",
|
||||||
buildId, stepNr, output.first, localStore->printStorePath(output.second.path));
|
buildId, stepNr, output.first, localStore->printStorePath(output.second.path));
|
||||||
|
@ -452,7 +452,7 @@ void State::markSucceededBuild(pqxx::work & txn, Build::ptr build,
|
||||||
bool State::checkCachedFailure(Step::ptr step, Connection & conn)
|
bool State::checkCachedFailure(Step::ptr step, Connection & conn)
|
||||||
{
|
{
|
||||||
pqxx::work txn(conn);
|
pqxx::work txn(conn);
|
||||||
for (auto & path : step->drv.outputPaths())
|
for (auto & path : step->drv->outputPaths())
|
||||||
if (!txn.exec_params("select 1 from FailedPaths where path = $1", localStore->printStorePath(path)).empty())
|
if (!txn.exec_params("select 1 from FailedPaths where path = $1", localStore->printStorePath(path)).empty())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -172,11 +172,11 @@ bool State::getQueuedBuilds(Connection & conn,
|
||||||
|
|
||||||
auto res = txn.exec_params1
|
auto res = txn.exec_params1
|
||||||
("select max(build) from BuildSteps where drvPath = $1 and startTime != 0 and stopTime != 0 and status = 1",
|
("select max(build) from BuildSteps where drvPath = $1 and startTime != 0 and stopTime != 0 and status = 1",
|
||||||
localStore->printStorePathh(ex.step->drvPath));
|
localStore->printStorePath(ex.step->drvPath));
|
||||||
if (!res[0].is_null()) propagatedFrom = res[0].as<BuildID>();
|
if (!res[0].is_null()) propagatedFrom = res[0].as<BuildID>();
|
||||||
|
|
||||||
if (!propagatedFrom) {
|
if (!propagatedFrom) {
|
||||||
for (auto & output : ex.step->drv.outputs) {
|
for (auto & output : ex.step->drv->outputs) {
|
||||||
auto res = txn.exec_params
|
auto res = txn.exec_params
|
||||||
("select max(s.build) from BuildSteps s join BuildStepOutputs o on s.build = o.build where path = $1 and startTime != 0 and stopTime != 0 and status = 1",
|
("select max(s.build) from BuildSteps s join BuildStepOutputs o on s.build = o.build where path = $1 and startTime != 0 and stopTime != 0 and status = 1",
|
||||||
localStore->printStorePath(output.second.path));
|
localStore->printStorePath(output.second.path));
|
||||||
|
|
Loading…
Reference in a new issue