From 8866172aaa35a090e3b6cea274d388add57865f1 Mon Sep 17 00:00:00 2001 From: Jan Kupec Date: Mon, 29 Sep 2008 08:46:24 +0000 Subject: [PATCH] - proper error message if the repository type can't be determined on refresh (bnc #389690) --- doc/TODO | 3 +-- src/repos.cc | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/TODO b/doc/TODO index eac2f98..29d9efd 100644 --- a/doc/TODO +++ b/doc/TODO @@ -5,8 +5,6 @@ - implement all rug commands (where it makes sense) - zypper [help] rug - add help texts for prompts -- show recommended and suggested in the summary -- report licenses of installed software NOT SCHEDULED @@ -37,3 +35,4 @@ Packages User can upgrade such packages with 'zypper in foo' then. ? list packages newly added to repos since last update (might be easy once we have package history) +- show recommended and suggested in the summary diff --git a/src/repos.cc b/src/repos.cc index 19c96fd..72d5c98 100644 --- a/src/repos.cc +++ b/src/repos.cc @@ -80,7 +80,7 @@ static bool refresh_raw_metadata(Zypper & zypper, _("Checking whether to refresh metadata for %s")) % repo.name()), Out::HIGH); for(RepoInfo::urls_const_iterator it = repo.baseUrlsBegin(); - it != repo.baseUrlsEnd(); ++it) + it != repo.baseUrlsEnd();) { try { @@ -115,7 +115,11 @@ static bool refresh_raw_metadata(Zypper & zypper, catch (const Exception & e) { ZYPP_CAUGHT(e); - ERR << *it << " doesn't look good. Trying another url." << endl; + Url badurl(*it); + if (++it == repo.baseUrlsEnd()) + ZYPP_RETHROW(e); + ERR << badurl << " doesn't look good. Trying another url (" + << *it << ")." << endl; } } } @@ -262,7 +266,7 @@ static bool build_cache(Zypper & zypper, const RepoInfo &repo, bool force_build) { ZYPP_CAUGHT(e); zypper.out().error(e, - _("Error building the cache database:")); + _("Error building the cache:")); // log untranslated message ERR << "Error writing to cache db" << endl; -- 2.7.4