X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/38d2959ffb8c6f5f291b2910014a67b1b352ab4c..6a4958d3134a3a61c036bc9ccaccc393c2bb99f2:/apt-pkg/update.cc diff --git a/apt-pkg/update.cc b/apt-pkg/update.cc index 5d5b19626..ca87c6976 100644 --- a/apt-pkg/update.cc +++ b/apt-pkg/update.cc @@ -11,7 +11,6 @@ #include #include -#include #include /*}}}*/ @@ -27,8 +26,8 @@ bool ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List, int PulseInterval) { - pkgAcquire Fetcher; - if (Fetcher.Setup(&Stat, _config->FindDir("Dir::State::Lists")) == false) + pkgAcquire Fetcher(&Stat); + if (Fetcher.GetLock(_config->FindDir("Dir::State::Lists")) == false) return false; // Populate it with the source selection @@ -74,9 +73,13 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval, uri.User.clear(); uri.Password.clear(); string descUri = string(uri); - _error->Warning(_("Failed to fetch %s %s\n"), descUri.c_str(), - (*I)->ErrorText.c_str()); - + // Show an error for non-transient failures, otherwise only warn + if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) + _error->Warning(_("Failed to fetch %s %s"), descUri.c_str(), + (*I)->ErrorText.c_str()); + else + _error->Error(_("Failed to fetch %s %s"), descUri.c_str(), + (*I)->ErrorText.c_str()); if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) { TransientNetworkFailure = true;