aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-force.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-10-23 18:45:47 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-12-10 16:34:15 +0200
commit33fce80ada305a5c3489e5716d515106b0fe73b2 (patch)
tree0f42fc0217d11bf1e23ac12b99e7b9819e125f07 /mod/mod-build-force.cxx
parente5e3c528e64c09e5493e821f700c959560432678 (diff)
Add ci_start::rebuild() function
Diffstat (limited to 'mod/mod-build-force.cxx')
-rw-r--r--mod/mod-build-force.cxx6
1 files changed, 6 insertions, 0 deletions
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<package_build> (
query<package_build>::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