Author: jkupec Date: Thu Sep 11 23:44:13 2008 New Revision: 11021 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11021&view=rev Log: - append path to baseurl of service repos (workaround for broke path handling in libzypp) Modified: trunk/libzypp/zypp/RepoManager.cc Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=11021&r1=11020&r2=11021&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Thu Sep 11 23:44:13 2008 @@ -1530,9 +1530,28 @@ // 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() ); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org