[yast-commit] r66998 - in /trunk/pkg-bindings: VERSION package/yast2-pkg-bindings.changes src/Service.cc
Author: lslezak Date: Tue Dec 6 16:27:21 2011 New Revision: 66998 URL: http://svn.opensuse.org/viewcvs/yast?rev=66998&view=rev Log: - fixed reloading of repositories which have been removed during service reload (bnc#724449) - 2.22.0 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Service.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=66998&r1=66997&r2=66998&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Tue Dec 6 16:27:21 2011 @@ -1 +1 @@ -2.21.11 +2.22.0 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=66998&r1=66997&r2=66998&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Tue Dec 6 16:27:21 2011 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Dec 6 13:29:53 UTC 2011 - lslezak@suse.cz + +- fixed reloading of repositories which have been removed during + service reload (bnc#724449) +- 2.22.0 + +------------------------------------------------------------------- Fri Nov 25 12:24:13 UTC 2011 - coolo@suse.com - add libtool as buildrequire to avoid implicit dependency Modified: trunk/pkg-bindings/src/Service.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Service.cc?rev=66998&r1=66997&r2=66998&view=diff ============================================================================== --- trunk/pkg-bindings/src/Service.cc (original) +++ trunk/pkg-bindings/src/Service.cc Tue Dec 6 16:27:21 2011 @@ -382,11 +382,24 @@ // reload all repositories for (RepoCont::size_type idx = 0; idx != repos.size(); ++idx) { + YRepo_Ptr repo = repos[idx]; + // the repo has not been removed - if (!(repos[idx])->isDeleted()) + if (!repo->isDeleted()) { - y2milestone("Reloading repository %s", (repos[idx])->repoInfo().alias().c_str()); - repos[idx]->repoInfo() = repomanager.getRepositoryInfo((repos[idx])->repoInfo().alias()); + zypp::RepoInfo info(repo->repoInfo()); + y2milestone("Reloading repository %s", info.alias().c_str()); + + if (repomanager.hasRepo(info)) + { + repos[idx]->repoInfo() = repomanager.getRepositoryInfo(info.alias()); + } + else + { + y2milestone("Repository %s has been removed, unloading it", (info.alias().c_str())); + RemoveResolvablesFrom(repo); + repo->setDeleted(); + } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn2.opensuse.org