forked from lix-project/hydra
Fix build against latest Nix
This commit is contained in:
parent
4cabb37ebd
commit
2f9d422172
|
@ -466,7 +466,7 @@ void State::failStep(
|
|||
/* Remember failed paths in the database so that they
|
||||
won't be built again. */
|
||||
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.commit();
|
||||
|
|
|
@ -258,7 +258,7 @@ unsigned int State::createBuildStep(pqxx::work & txn, time_t startTime, BuildID
|
|||
localStore->printStorePath(step->drvPath),
|
||||
status == bsBusy ? 1 : 0,
|
||||
startTime != 0 ? std::make_optional(startTime) : std::nullopt,
|
||||
step->drv.platform,
|
||||
step->drv->platform,
|
||||
status != bsBusy ? std::make_optional((int) status) : std::nullopt,
|
||||
propagatedFrom != 0 ? std::make_optional(propagatedFrom) : std::nullopt, // internal::params
|
||||
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;
|
||||
|
||||
for (auto & output : step->drv.outputs)
|
||||
for (auto & output : step->drv->outputs)
|
||||
txn.exec_params0
|
||||
("insert into BuildStepOutputs (build, stepnr, name, path) values ($1, $2, $3, $4)",
|
||||
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)
|
||||
{
|
||||
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())
|
||||
return true;
|
||||
return false;
|
||||
|
|
|
@ -172,11 +172,11 @@ bool State::getQueuedBuilds(Connection & conn,
|
|||
|
||||
auto res = txn.exec_params1
|
||||
("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 (!propagatedFrom) {
|
||||
for (auto & output : ex.step->drv.outputs) {
|
||||
for (auto & output : ex.step->drv->outputs) {
|
||||
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",
|
||||
localStore->printStorePath(output.second.path));
|
||||
|
|
Loading…
Reference in a new issue