Author: lslezak Date: Wed Apr 21 21:16:45 2010 New Revision: 61814 URL: http://svn.opensuse.org/viewcvs/yast?rev=61814&view=rev Log: - reload services rnd epositories after service refresh to avoid overwriting the updated files (bnc#581766) - 2.19.1 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Service.cc trunk/pkg-bindings/src/ServiceManager.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=61814&r1=61813&r2=61814&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Wed Apr 21 21:16:45 2010 @@ -1 +1 @@ -2.19.0 +2.19.1 Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=61814&r1=61813&r2=61814&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Wed Apr 21 21:16:45 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Apr 21 17:22:31 UTC 2010 - lslezak@suse.cz + +- reload services rnd epositories after service refresh to avoid + overwriting the updated files (bnc#581766) +- 2.19.1 + +------------------------------------------------------------------- Mon Jan 18 14:40:21 UTC 2010 - lslezak@suse.cz - Pkg::ResolvableProperties() - return 'product' value from Modified: trunk/pkg-bindings/src/Service.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Service.cc?rev=61814&r1=61813&r2=61814&view=diff ============================================================================== --- trunk/pkg-bindings/src/Service.cc (original) +++ trunk/pkg-bindings/src/Service.cc Wed Apr 21 21:16:45 2010 @@ -373,7 +373,24 @@ } zypp::RepoManager repomanager = CreateRepoManager(); - return YCPBoolean(service_manager.RefreshService(alias->value(), repomanager)); + + if (!service_manager.RefreshService(alias->value(), repomanager)) + { + return YCPBoolean(false); + } + + // reload all repositories + for (RepoCont::size_type idx = 0; idx != repos.size(); ++idx) + { + // the repo has not been removed + if (!(repos[idx])->isDeleted()) + { + y2milestone("Reloading repository %s", (repos[idx])->repoInfo().alias().c_str()); + repos[idx]->repoInfo() = repomanager.getRepositoryInfo((repos[idx])->repoInfo().alias()); + } + } + + return YCPBoolean(true); } catch (const zypp::Exception& excpt) { Modified: trunk/pkg-bindings/src/ServiceManager.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/ServiceManager.cc?rev=61814&r1=61813&r2=61814&view=diff ============================================================================== --- trunk/pkg-bindings/src/ServiceManager.cc (original) +++ trunk/pkg-bindings/src/ServiceManager.cc Wed Apr 21 21:16:45 2010 @@ -107,6 +107,16 @@ } repomgr.refreshService(serv_it->second); + + // load the service from disk + PkgService new_service(repomgr.getService(alias), alias); + DBG << "Reloaded service: " << new_service; + + // remove the old service + _known_services.erase(serv_it); + // insert new + _known_services.insert(std::make_pair(alias, new_service)); + return true; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org