Author: schubi2 Date: Thu Apr 17 13:03:08 2008 New Revision: 46780 URL: http://svn.opensuse.org/viewcvs/yast?rev=46780&view=rev Log: - do not iterate over the repo's if the target does not exist. But additional handling is needed in libzypp. bnc #380656 Modified: trunk/pkg-bindings/src/Source_Resolvables.cc Modified: trunk/pkg-bindings/src/Source_Resolvables.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Resolvabl... ============================================================================== --- trunk/pkg-bindings/src/Source_Resolvables.cc (original) +++ trunk/pkg-bindings/src/Source_Resolvables.cc Thu Apr 17 13:03:08 2008 @@ -51,17 +51,11 @@ */ bool PkgFunctions::AnyResolvableFrom(const std::string &alias) { - // check whether there is a known repository with the requested alias - for (zypp::ResPool::repository_iterator it = zypp_ptr()->pool().knownRepositoriesBegin() - ; it != zypp_ptr()->pool().knownRepositoriesEnd() - ; ++it) + zypp::Repository r = zypp::sat::Pool::instance().reposFind(alias); + if ( r != zypp::Repository::noRepository ) { - if (it->info().alias() == alias) - { - return true; - } + return ( r.solvablesSize() > 0 ); } - return false; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org