From 423d101ca8ef75a7fbb238b902b8e1799ef50b9b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Jan 2016 17:13:09 +0200 Subject: Support repository web interface relative locations --- loader/loader.cxx | 6 ++++-- tests/loader/1/staging/repositories | 2 +- tests/loader/driver.cxx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/loader/loader.cxx b/loader/loader.cxx index 994ec9a..591660c 100644 --- a/loader/loader.cxx +++ b/loader/loader.cxx @@ -411,10 +411,12 @@ load_repositories (const shared_ptr& rp, database& db) if (rm.effective_role () == repository_role::base) { + assert (rp->location.remote () && !rp->url); + + rp->url = rm.effective_url (rp->location); + // Update the base repository with manifest values. // - rp->url = move (rm.url); - // @@ Should we throw if url is not available for external repository ? // Can, basically, repository be available on the web but have no web // interface associated ? diff --git a/tests/loader/1/staging/repositories b/tests/loader/1/staging/repositories index 8443ab8..d72a3f8 100644 --- a/tests/loader/1/staging/repositories +++ b/tests/loader/1/staging/repositories @@ -1,4 +1,4 @@ : 1 # Local repository manifest (this repository). # -url: http://stage.cppget.org +url: ../../.. diff --git a/tests/loader/driver.cxx b/tests/loader/driver.cxx index d732895..67093d9 100644 --- a/tests/loader/driver.cxx +++ b/tests/loader/driver.cxx @@ -674,7 +674,7 @@ main (int argc, char* argv[]) "http://pkg.cppget.org/1/staging"); assert (gr->display_name.empty ()); assert (gr->priority == 0); - assert (gr->url && *gr->url == "http://stage.cppget.org/"); + assert (gr->url && *gr->url == "http://cppget.org/"); assert (!gr->email); assert (!gr->summary); assert (!gr->description); -- cgit v1.1