Author: jkupec Date: Wed Oct 22 15:43:32 2008 New Revision: 11449 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11449&view=rev Log: - fix unexpected exception when checking if refresh is needed after a failed rpm download (bnc #436299) Modified: trunk/zypper/src/solve-commit.cc Modified: trunk/zypper/src/solve-commit.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/solve-commit.cc?rev=11449&r1=11448&r2=11449&view=diff ============================================================================== --- trunk/zypper/src/solve-commit.cc (original) +++ trunk/zypper/src/solve-commit.cc Wed Oct 22 15:43:32 2008 @@ -627,7 +627,7 @@ // objects from previous lists that // are not supported KindToResObjectSet tounsupported; - + // iterate the to_be_installed to find installs/upgrades/downgrades + size info ByteCount download_size, new_installed_size; @@ -644,8 +644,8 @@ if ( pkg ) { // FIXME refactor with libzypp Package::vendorSupportAvailable() - - if ( pkg->maybeUnsupported() ) + + if ( pkg->maybeUnsupported() ) tounsupported[res->kind()].insert(res); } @@ -1116,18 +1116,23 @@ RepoManager manager(zypper.globalOpts().rm_options ); bool refresh_needed = false; - for(RepoInfo::urls_const_iterator it = e.info().baseUrlsBegin(); - it != e.info().baseUrlsEnd(); ++it) - { - RepoManager::RefreshCheckStatus stat = manager. - checkIfToRefreshMetadata(e.info(), *it, - RepoManager::RefreshForced ); - if ( stat == RepoManager::REFRESH_NEEDED ) + try + { + for(RepoInfo::urls_const_iterator it = e.info().baseUrlsBegin(); + it != e.info().baseUrlsEnd(); ++it) { - refresh_needed = true; - break; + RepoManager::RefreshCheckStatus stat = manager. + checkIfToRefreshMetadata(e.info(), *it, + RepoManager::RefreshForced ); + if ( stat == RepoManager::REFRESH_NEEDED ) + { + refresh_needed = true; + break; + } } - } + } + catch (const Exception &) + { DBG << "check if to refresh exception caught, ignoring" << endl; } std::string hint = _("Please see the above error message for a hint."); if (refresh_needed) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org