Author: jkupec Date: Sun Dec 2 16:47:36 2007 New Revision: 8002 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8002&view=rev Log: - load resolvables only once in shell - TODO: handle repository manipulation within the shell (the pool and the internal data must be updated) Modified: trunk/zypper/src/zypper-repos.cc Modified: trunk/zypper/src/zypper-repos.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-repos.cc?rev=8002&r1=8001&r2=8002&view=diff ============================================================================== --- trunk/zypper/src/zypper-repos.cc (original) +++ trunk/zypper/src/zypper-repos.cc Sun Dec 2 16:47:36 2007 @@ -352,9 +352,7 @@ return; if ( !zypper.globalOpts().disable_system_sources ) - { do_init_repos(zypper); - } done = true; } @@ -1102,9 +1100,17 @@ void cond_load_resolvables(Zypper & zypper, bool to_pool) { + static bool done = false; + // don't call this fuction more than once for a single ZYpp instance + // (e.g. in shell) + if (done) + return; + load_repo_resolvables(zypper, to_pool); if (!zypper.globalOpts().disable_system_resolvables && to_pool) load_target_resolvables(zypper); + + done = true; } // --------------------------------------------------------------------------- -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org