]> git.saurik.com Git - apt.git/commit - apt-pkg/indexfile.cc
avoid using global PendingError to avoid failing too often too soon
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 10 Sep 2015 17:00:51 +0000 (19:00 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 14 Sep 2015 13:22:18 +0000 (15:22 +0200)
commit95278287f4e1eeaf5d96749d6fc9bfc53fb400d0
tree90cc504d25c680b2fc3fe77994573e517263275f
parent7f58427b9584686f80cd5eccfdd02c1ace75518a
avoid using global PendingError to avoid failing too often too soon

Our error reporting is historically grown into some kind of mess.
A while ago I implemented stacking for the global error which is used in
this commit now to wrap calls to functions which do not report (all)
errors via return, so that only failures in those calls cause a failure
to propergate down the chain rather than failing if anything
(potentially totally unrelated) has failed at some point in the past.

This way we can avoid stopping the entire acquire process just because a
single source produced an error for example. It also means that after
the acquire process the cache is generated – even if the acquire
process had failures – as we still have the old good data around we can and
should generate a cache for (again).

There are probably more instances of this hiding, but all these looked
like the easiest to work with and fix with reasonable (aka net-positive)
effects.
22 files changed:
apt-pkg/acquire-item.cc
apt-pkg/acquire.cc
apt-pkg/cachefile.cc
apt-pkg/contrib/error.cc
apt-pkg/contrib/error.h
apt-pkg/contrib/fileutl.cc
apt-pkg/contrib/mmap.cc
apt-pkg/deb/debmetaindex.cc
apt-pkg/deb/dpkgpm.cc
apt-pkg/indexcopy.cc
apt-pkg/indexfile.cc
apt-pkg/packagemanager.cc
apt-pkg/pkgcachegen.cc
apt-pkg/policy.cc
apt-pkg/sourcelist.cc
apt-pkg/srcrecords.cc
apt-private/private-sources.cc
methods/rred.cc
test/integration/test-apt-get-update-unauth-warning
test/integration/test-apt-update-ims
test/integration/test-apt-update-not-modified
test/integration/test-bug-595691-empty-and-broken-archive-files