Author: jkupec Date: Fri Jul 6 18:42:27 2007 New Revision: 5925 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5925&view=rev Log: refresh and read_repo_resolvables() output clean-up Modified: trunk/zypper/src/zypper-misc.cc trunk/zypper/src/zypper-sources.cc Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=592... ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Fri Jul 6 18:42:27 2007 @@ -436,18 +436,21 @@ % repo.alias() << endl; manager.buildCache(repo); } - + // TranslatorExplanation speaking of a repository + cout_n << format(_("Reading repository %s...")) % repo.alias() << flush; repository = manager.createFromCache(repo); + ResStore store = repository.resolvables(); + cout_v << " " << format(_("(%d resolvables found)")) % store.size(); + God->addResolvables(store); - - cout_vv << format(_("(%d resolvables found)")) % store.size() << endl; + cout_n << endl; } catch (const Exception & e) { ZYPP_CAUGHT(e); cerr << format(_("Problem loading data from '%s'")) % repo.alias(); - cerr_v << ":" << e.msg(); + cerr_v << ":" << endl << e.msg(); cerr << endl; cerr << format(_("Resolvables from '%s' not loaded because of error.")) % repo.alias() << endl; Modified: trunk/zypper/src/zypper-sources.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.cc?rev=... ============================================================================== --- trunk/zypper/src/zypper-sources.cc (original) +++ trunk/zypper/src/zypper-sources.cc Fri Jul 6 18:42:27 2007 @@ -153,6 +153,8 @@ RepoManager manager; gData.repos = manager.knownRepositories(); + int error_count = 0; + int enabled_repo_count = gData.repos.size(); for (std::list<RepoInfo>::iterator it = gData.repos.begin(); it != gData.repos.end(); ++it) { @@ -163,6 +165,7 @@ { cout_v << format(_("Skipping disabled repository '%s'")) % repo.alias() << endl; + enabled_repo_count--; continue; } @@ -179,7 +182,7 @@ catch ( const Exception &e ) { cerr << format(_("Error reading repository '%s':")) % repo.alias() - << endl << e.msg() << endl; + << endl << e.asUserString() << endl; cerr << format(_("Skipping repository '%s' because of the above error.")) % repo.alias() << endl; // log untranslated message @@ -187,10 +190,16 @@ << endl << e.msg() << endl; ERR << format("Skipping repository '%s' because of the above error.") % repo.alias() << endl; + error_count++; } } - cout_n << _("All system sources have been refreshed.") << endl; + if (error_count == enabled_repo_count) + cerr << _("Could not refresh the repositories because of errors.") << endl; + else if (error_count) + cerr << _("Some of the repositories have not been refreshed because of error.") << endl; + else + cout_n << _("All repositories have been refreshed.") << endl; } // ---------------------------------------------------------------------------- -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org