This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d0be735f160c8f5f69d29c8154b9a6c2879733b9 commit d0be735f160c8f5f69d29c8154b9a6c2879733b9 Author: Guillem Jover <[email protected]> AuthorDate: Mon Jan 21 12:58:34 2019 +0100 dpkg: Move trigproc cycle reset inside try-deferred conditional We should only reset the cycle detection in case we are not bailing out from the processing with an error, otherwise we could come back to this package and detect an artificial trigger cycle. --- debian/changelog | 4 ++++ src/trigproc.c | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 93a6de90e..f0d38635f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,6 +38,10 @@ dpkg (1.19.3) UNRELEASED; urgency=medium dependencies are not satisfied yet. * dpkg: Convert one trigger processing required type into the new try-queued one, so that we stop skipping unsatisfiable dependency checks. + * dpkg: Move trigproc cycle reset inside try-deferred conditional. We should + only reset the cycle detection in case we are not bailing out from the + processing with an error, otherwise we could come back to this package and + detect an artificial trigger cycle. * Perl modules: - Dpkg::Changelog::Debian: Preserve modelines at EOF. Closes: #916056 Thanks to Chris Lamb <[email protected]> for initial test cases. diff --git a/src/trigproc.c b/src/trigproc.c index 5b7066d8a..3836c90fa 100644 --- a/src/trigproc.c +++ b/src/trigproc.c @@ -405,18 +405,17 @@ trigproc(struct pkginfo *pkg, enum trigproc_type type) enqueue_package(pkg); return; } else if (ok == DEP_CHECK_HALT) { - /* We cannot process this package on this dpkg run, - * and we can get here repeatedly if this package is - * required to make progress for other packages. So - * reset the trigger cycles tracking to avoid bogus - * cycle detections. */ - trigproc_reset_cycle(); - - /* When doing opportunistic trigger processing, nothing - * requires us to be able to make progress; skip the - * package and silently ignore the error due to - * unsatisfiable dependencies. */ + /* When doing opportunistic deferred trigger processing, + * nothing requires us to be able to make progress; + * skip the package and silently ignore the error due + * to unsatisfiable dependencies. And because we can + * end up here repeatedly, if this package is required + * to make progress for other packages, we need to + * reset the trigger cycle tracking to avoid detecting + * bogus cycles*/ if (type == TRIGPROC_TRY_DEFERRED) { + trigproc_reset_cycle(); + varbuf_destroy(&depwhynot); return; } -- Dpkg.Org's dpkg

