From 2762771d64e708969fabdbc6121894c860214b45 Mon Sep 17 00:00:00 2001 From: Jan Kupec Date: Thu, 11 Sep 2008 21:44:13 +0000 Subject: [PATCH] - append path to baseurl of service repos (workaround for broke path handling in libzypp) --- zypp/RepoManager.cc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc index 38b1db5..c1a1718 100644 --- a/zypp/RepoManager.cc +++ b/zypp/RepoManager.cc @@ -1530,9 +1530,28 @@ namespace zypp // set service alias and base url for all collected repositories for_( it, collector.repos.begin(), collector.repos.end() ) { + Url url; + // if the repo url was not set by the repoindex parser, set service's url if ( it->baseUrlsEmpty() ) - it->setBaseUrl( service.url() ); + url = service.url(); + else + // service repo can contain only one URL now, so no need to iterate + url = *it->baseUrlsBegin(); + + // libzypp currently has problem with separate url + path handling + // so just append the path to the baseurl + if (!it->path().empty()) + { + Pathname path(url.getPathName()); + path /= it->path(); + url.setPathName( path.asString() ); + it->setPath(""); + } + + // save the url + it->setBaseUrl( url ); + // set refrence to the parent service it->setService( service.alias() ); } -- 2.7.4