]> git.saurik.com Git - apt.git/commit
update: Run Post-Invoke-Success if not all sources failed
authorJulian Andres Klode <jak@debian.org>
Tue, 10 May 2016 17:15:17 +0000 (19:15 +0200)
committerJulian Andres Klode <jak@debian.org>
Tue, 10 May 2016 18:53:44 +0000 (20:53 +0200)
commit31cc85c5f6392fd85ff19f90714e41726f917a30
tree24f630bb1dc86e691ff49c0e01f1e9dcd2d5ba08
parenta39467f5d9fc51c9bf32d0f0e42e36041ece6bd5
update: Run Post-Invoke-Success if not all sources failed

Failures can happen and APT regardless will do a partial cache
update anyway. Because APT ensures that the list directory is
in a sane state, it makes sense to also call success hooks if
success was only partial - otherwise it loses sync with APT.

Most importantly, this causes the appstream cache to be empty,
see launchpad bug #1562733.

This is somewhat overly optimistic though: As soon as any repository
has nonexisting optional files, the missing optional files are also
treated as success, which means a single broken repository without an
InRelease file still runs Success hooks, even though it really should
not.

(cherry picked from commit 35664152e47a1d4d712fd52e0f0a2dc8ed359d32)
apt-pkg/update.cc
test/integration/test-apt-update-hooks [new file with mode: 0755]