aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-11 17:13:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-14 15:10:50 +0200
commit423d101ca8ef75a7fbb238b902b8e1799ef50b9b (patch)
tree1c01d28f9cc45a704f253e7738e1753da9fd96ad
parenta49149ba35d4fb138c7c325f506f658a475f847e (diff)
Support repository web interface relative locations
-rw-r--r--loader/loader.cxx6
-rw-r--r--tests/loader/1/staging/repositories2
-rw-r--r--tests/loader/driver.cxx2
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<repository>& 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);