[yast-commit] r62668 - in /trunk/pkg-bindings: package/yast2-pkg-bindings.changes src/Source_Load.cc
Author: lslezak Date: Fri Oct 22 09:05:35 2010 New Revision: 62668 URL: http://svn.opensuse.org/viewcvs/yast?rev=62668&view=rev Log: - ignore just the failed repository during autorefresh, load the other repositories (bnc#620895) Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Source_Load.cc 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=62668&r1=62667&r2=62668&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Fri Oct 22 09:05:35 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Oct 22 07:00:47 UTC 2010 - lslezak@localhost + +- ignore just the failed repository during autorefresh, load the + other repositories (bnc#620895) + +------------------------------------------------------------------- Thu Sep 30 17:32:48 UTC 2010 - lslezak@suse.cz - don't use spaces in repo alias (bnc#596950) Modified: trunk/pkg-bindings/src/Source_Load.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Load.cc?rev=62668&r1=62667&r2=62668&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source_Load.cc (original) +++ trunk/pkg-bindings/src/Source_Load.cc Fri Oct 22 09:05:35 2010 @@ -248,6 +248,10 @@ bool refresh_started_called = false; bool network_is_running = NetworkDetected(); + // remember failed repositories during autorefresh, + // don't load packages from them + RepoCont failed_refresh; + if (repos_to_refresh > 0) { // refresh metadata @@ -287,17 +291,16 @@ } } - - zypp::RepoManager::RefreshCheckStatus ref_stat = repomanager.checkIfToRefreshMetadata((*it)->repoInfo(), *((*it)->repoInfo().baseUrlsBegin())); - - if (ref_stat != zypp::RepoManager::REFRESH_NEEDED) - { - y2internal("Skipping repository '%s' - refresh is not needed", (*it)->repoInfo().alias().c_str()); - continue; - } - try { + zypp::RepoManager::RefreshCheckStatus ref_stat = repomanager.checkIfToRefreshMetadata((*it)->repoInfo(), *((*it)->repoInfo().baseUrlsBegin())); + + if (ref_stat != zypp::RepoManager::REFRESH_NEEDED) + { + y2internal("Skipping repository '%s' - refresh is not needed", (*it)->repoInfo().alias().c_str()); + continue; + } + y2milestone("Autorefreshing source: %s", (*it)->repoInfo().alias().c_str()); // refresh the repository if (!refresh_started_called) @@ -312,6 +315,9 @@ // no need to handle them in the exception code catch (const zypp::Exception& excpt) { + // remember the failed autorefresh + failed_refresh.push_back(*it); + if (autorefresh_skipped) { y2warning("autorefresh_skipped, ignoring the exception"); @@ -428,6 +434,14 @@ // load resolvables only from enabled repos which are not deleted if ((*it)->repoInfo().enabled() && !(*it)->isDeleted()) { + // check whether the refresh failed or not + RepoCont::iterator failed_it = find(failed_refresh.begin(), failed_refresh.end(), *it); + if (failed_it != failed_refresh.end()) + { + y2warning("Ignoring packages from repository '%s' (%s) - refresh has failed", (*it)->repoInfo().name().c_str(), (*it)->repoInfo().alias().c_str()); + continue; + } + y2debug("Loading: %s, Status: %lld", (*it)->repoInfo().alias().c_str(), prog_total.val()); // subtask -- 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