it != gData.repos.end(); ++it)
{
RepoInfo repo(*it);
+ MIL << "Loading " << repo.alias() << " resolvables." << endl;
if (! it->enabled())
continue; // #217297
repository = manager.createFromCache(repo);
ResStore store = repository.resolvables();
- cout_v << " " << format(_("(%d resolvables found)")) % store.size();
+ cout_v << " " << format(_("(%d resolvables found)")) % store.size() << endl;
God->addResolvables(store);
}
+ catch (const repo::RepoMetadataException & ex)
+ {
+ cerr << _("asdf") << endl;
+ }
catch (const Exception & e)
{
ZYPP_CAUGHT(e);
it != gData.repos.end(); ++it)
{
RepoInfo repo(*it);
+ MIL << "initializing " << repo.alias() << endl;
//! \todo honor command line options/commands
bool do_refresh = repo.enabled() && repo.autorefresh();
if (do_refresh)
{
- //! \todo progress reporting
cout_v << format(
_("Checking whether to refresh metadata for %s.")) % repo.alias()
<< endl;
- manager.refreshMetadata(repo);
+ MIL << "calling refresh for " << repo.alias() << endl;
+
+ try { manager.refreshMetadata(repo); }
+ catch (const RepoException & ex)
+ {
+ cerr << format(_("Repository %s is invalid.")) % repo.alias() << endl;
+ cerr_v << _("Reason: ") << ex.asUserString() << endl;
+ ERR << repo.alias() << " is invalid, disabling it" << endl;
+ it->setEnabled(false);
+ }
+ catch (const Exception & ex)
+ {
+ cerr << format(_("Error while refreshing repository %s:")) % repo.alias()
+ << endl;
+ cerr << ex.asUserString() << endl;
+ ERR << "Error while refreshing " << repo.alias() << ", disabling it" << endl;
+ it->setEnabled(false);
+ }
}
}
}