diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-09-24 11:10:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-09-24 11:10:50 +0300 |
commit | 41480b8da4a7d039bf3e1ba57339b228188d6b12 (patch) | |
tree | cd20e90243988f4ba297b00bad33c39981af756e /mod | |
parent | 3cb2a7937b281516bde876e5884fbe5ec552ec9b (diff) |
Fix package version details page not to print unbuilt configurations for archived tenant
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-package-version-details.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index 0271e03..b22e091 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -355,6 +355,8 @@ handle (request& rq, response& rs) if (builds) package_db_->load (*pkg, pkg->build_section); + bool archived (package_db_->load<brep::tenant> (tenant)->archived); + t.commit (); const auto& rm (pkg->requirements); @@ -419,9 +421,16 @@ handle (request& rq, response& rs) // Print built and unbuilt package configurations, except those that are // hidden or excluded by the package. // - // Query toolchains seen for the package tenant. + // Query toolchains seen for the package tenant to produce a list of the + // unbuilt configuration/toolchain combinations. + // + // Note that it only make sense to print those unbuilt configurations that + // may still be built. That's why we leave the toolchains list empty if + // the package tenant is achieved. // vector<pair<string, version>> toolchains; + + if (!archived) { using query = query<toolchain>; |