% 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;
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)
{
{
cout_v << format(_("Skipping disabled repository '%s'")) % repo.alias()
<< endl;
+ enabled_repo_count--;
continue;
}
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
<< 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;
}
// ----------------------------------------------------------------------------