[yast-commit] r51725 - in /trunk/pkg-bindings: package/yast2-pkg-bindings.changes src/ServiceManager.cc src/ServiceManager.h

Author: lslezak Date: Wed Oct 1 13:08:40 2008 New Revision: 51725 URL: http://svn.opensuse.org/viewcvs/yast?rev=51725&view=rev Log: - fixed Pkg::ServiceRefresh() - search for the service URL and pass it to libzypp Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/ServiceManager.cc trunk/pkg-bindings/src/ServiceManager.h Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bi... ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Wed Oct 1 13:08:40 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Oct 1 13:02:00 CEST 2008 - lslezak@suse.cz + +- fixed Pkg::ServiceRefresh() - search for the service URL and pass + it to libzypp + +------------------------------------------------------------------- Mon Sep 29 14:27:21 CEST 2008 - lslezak@suse.cz - do not autorefresh remote repositories when there is no network Modified: trunk/pkg-bindings/src/ServiceManager.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/ServiceManager.c... ============================================================================== --- trunk/pkg-bindings/src/ServiceManager.cc (original) +++ trunk/pkg-bindings/src/ServiceManager.cc Wed Oct 1 13:08:40 2008 @@ -114,11 +114,19 @@ return ret; } -bool ServiceManager::RefreshService(const std::string &alias, zypp::RepoManager &repomgr) const +bool ServiceManager::RefreshService(const std::string &alias, zypp::RepoManager &repomgr) { try { - repomgr.refreshService(alias); + PkgServices::iterator serv_it = _known_services.find(alias); + + if (serv_it == _known_services.end()) + { + y2error("Service '%s' does not exist", alias.c_str()); + return false; + } + + repomgr.refreshService(serv_it->second); return true; } catch(...) Modified: trunk/pkg-bindings/src/ServiceManager.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/ServiceManager.h... ============================================================================== --- trunk/pkg-bindings/src/ServiceManager.h (original) +++ trunk/pkg-bindings/src/ServiceManager.h Wed Oct 1 13:08:40 2008 @@ -52,7 +52,7 @@ bool SetService(const std::string old_alias, const zypp::ServiceInfo &srv); - bool RefreshService(const std::string &alias, zypp::RepoManager &repomgr) const; + bool RefreshService(const std::string &alias, zypp::RepoManager &repomgr); std::string Probe(const zypp::Url &url, const zypp::RepoManager &repomgr) const; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org