aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-package-version-details.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-03-13 16:09:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-03-26 20:41:21 +0300
commit6ccee38f43493f8f6e87bab549e9ef952244f39a (patch)
tree3c75f102175fc6a566234e904a818dcd74029755 /mod/mod-package-version-details.cxx
parentf7327a0b3cd6723cb289819bad1d664cfd5d6618 (diff)
Add support for interactive CI mode
Diffstat (limited to 'mod/mod-package-version-details.cxx')
-rw-r--r--mod/mod-package-version-details.cxx43
1 files changed, 26 insertions, 17 deletions
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx
index a7682ec..a23989e 100644
--- a/mod/mod-package-version-details.cxx
+++ b/mod/mod-package-version-details.cxx
@@ -472,7 +472,7 @@ handle (request& rq, response& rs)
}
}
- bool archived (package_db_->load<brep::tenant> (tenant)->archived);
+ shared_ptr<brep::tenant> tn (package_db_->load<brep::tenant> (tenant));
t.commit ();
@@ -504,7 +504,7 @@ handle (request& rq, response& rs)
//
vector<pair<string, version>> toolchains;
- if (!archived)
+ if (!tn->archived)
{
using query = query<toolchain>;
@@ -568,8 +568,12 @@ handle (request& rq, response& rs)
b.toolchain_version.string ())
<< TR_VALUE ("config",
b.configuration + " / " + b.target.string ())
- << TR_VALUE ("timestamp", ts)
- << TR_BUILD_RESULT (b, host, root)
+ << TR_VALUE ("timestamp", ts);
+
+ if (b.interactive) // Note: can only be present for the building state.
+ s << TR_VALUE ("login", *b.interactive);
+
+ s << TR_BUILD_RESULT (b, host, root)
<< ~TBODY
<< ~TABLE;
@@ -606,22 +610,27 @@ handle (request& rq, response& rs)
<< ~TABLE;
}
- // Print the package build exclusions that belong to the 'default' class.
+ // Print the package build exclusions that belong to the 'default' class,
+ // unless the package is built interactively (normally for a single
+ // configuration).
//
- for (const auto& c: *build_conf_)
+ if (!tn->interactive)
{
- string reason;
- if (belongs (c, "default") && exclude (c, &reason))
+ for (const auto& c: *build_conf_)
{
- s << TABLE(CLASS="proplist build")
- << TBODY
- << TR_VALUE ("config", c.name + " / " + c.target.string ())
- << TR_VALUE ("result",
- !reason.empty ()
- ? "excluded (" + reason + ')'
- : "excluded")
- << ~TBODY
- << ~TABLE;
+ string reason;
+ if (belongs (c, "default") && exclude (c, &reason))
+ {
+ s << TABLE(CLASS="proplist build")
+ << TBODY
+ << TR_VALUE ("config", c.name + " / " + c.target.string ())
+ << TR_VALUE ("result",
+ !reason.empty ()
+ ? "excluded (" + reason + ')'
+ : "excluded")
+ << ~TBODY
+ << ~TABLE;
+ }
}
}