From 85065024eb4ca2ec1dac4dc7cb1fc8ff8fb238c8 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 23 Oct 2024 18:45:47 +0200 Subject: Add ci_start::rebuild() function --- mod/mod-build-force.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/mod-build-force.cxx') diff --git a/mod/mod-build-force.cxx b/mod/mod-build-force.cxx index ea921e9..8666889 100644 --- a/mod/mod-build-force.cxx +++ b/mod/mod-build-force.cxx @@ -198,6 +198,9 @@ handle (request& rq, response& rs) // connection_ptr conn (build_db_->connection ()); + // NOTE: don't forget to update ci_start::rebuild() if changing anything + // here. + // { transaction t (conn->begin ()); @@ -206,8 +209,11 @@ handle (request& rq, response& rs) if (!build_db_->query_one ( query::build::id == id, pb) || + pb.archived || (b = move (pb.build))->state == build_state::queued) + { config_expired ("no package build"); + } force_state force (b->state == build_state::built ? force_state::forced -- cgit v1.1