From 41480b8da4a7d039bf3e1ba57339b228188d6b12 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 24 Sep 2019 11:10:27 +0300 Subject: Fix package version details page not to print unbuilt configurations for archived tenant --- mod/mod-package-version-details.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mod/mod-package-version-details.cxx') 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 (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> toolchains; + + if (!archived) { using query = query; -- cgit v1.1