From d4aef182ebc55091c02659b7549487d928eaec28 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 27 Feb 2019 23:06:46 +0300 Subject: Build packages for different toolchains having same version but different names --- mod/mod-build-log.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'mod/mod-build-log.cxx') diff --git a/mod/mod-build-log.cxx b/mod/mod-build-log.cxx index 3dac599..c61ad92 100644 --- a/mod/mod-build-log.cxx +++ b/mod/mod-build-log.cxx @@ -66,13 +66,12 @@ handle (request& rq, response& rs) throw invalid_request (501, "not implemented"); // Parse the HTTP request URL path (without the root directory) to obtain - // the build package name/version, the configuration name and the optional - // operation name. If the operation is not specified then print logs for all - // the operations. + // the build id and optional operation name. If the operation is not + // specified then print logs for all the operations. // // Note that the URL path must be in the following form: // - // //log//[/] + // //log///[/] // // Also note that the presence of the first 3 components is guaranteed by // the repository_root module. @@ -136,12 +135,21 @@ handle (request& rq, response& rs) throw invalid_argument ("empty configuration name"); if (i == lpath.end ()) + throw invalid_argument ("no toolchain name"); + + string toolchain_name (*i++); + + if (toolchain_name.empty ()) + throw invalid_argument ("empty toolchain name"); + + if (i == lpath.end ()) throw invalid_argument ("no toolchain version"); version toolchain_version (parse_version (*i++, "toolchain version")); id = build_id (package_id (tenant, move (name), package_version), move (config), + move (toolchain_name), toolchain_version); if (i != lpath.end ()) -- cgit v1.1