aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-log.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-27 23:06:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-28 20:18:39 +0300
commitd4aef182ebc55091c02659b7549487d928eaec28 (patch)
tree881d1d8bedbc7f88fe22a9437cce6433cfd7122d /mod/mod-build-log.cxx
parent8054f2973d453b71806f52f0bb30725cb31d64dd (diff)
Build packages for different toolchains having same version but different names
Diffstat (limited to 'mod/mod-build-log.cxx')
-rw-r--r--mod/mod-build-log.cxx16
1 files changed, 12 insertions, 4 deletions
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:
//
- // <pkg-name>/<pkg-version>/log/<cfg-name>/<toolchain-version>[/<operation>]
+ // <pkg-name>/<pkg-version>/log/<cfg-name>/<toolchain-name>/<toolchain-version>[/<operation>]
//
// 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 ())