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=a23fdc82c44011d2aa54138df4c4af37bd4d5e9e commit a23fdc82c44011d2aa54138df4c4af37bd4d5e9e Author: Guillem Jover <[email protected]> AuthorDate: Mon Jan 21 12:58:34 2019 +0100 dpkg: Split trigger processing types into required, try-queued and try-deferred Each of these reasons for processing triggers have different requirements and attributes: - The required one, must perform all checks as it is done as part of a simple loop to guarantee Pre-Depends satisfiability. - The try-deferred one, must not fail on unsatisfiable dependencies, as we are doing opportunistic trigger processing, after a normal processing queue run. - The try-queued one, must perform all checks and fail hard if any unsatisfiable scenario occurs. --- debian/changelog | 2 ++ src/main.h | 6 ++++-- src/trigproc.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 409195f0e..a37ad29a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -94,6 +94,8 @@ dpkg (1.19.3) UNRELEASED; urgency=medium - dpkg: Switch dependtry from an int to an enum. - dpkg: Move dependtry description from deferred_configure() to its declaration. + - dpkg: Split trigger processing types into required, try-queued and + try-deferred. * Build system: - get-version: Use a format string with printf. - run-script: Use $() instead of deprecated ``. diff --git a/src/main.h b/src/main.h index e43e6d28d..c60ccfab0 100644 --- a/src/main.h +++ b/src/main.h @@ -318,8 +318,10 @@ void dpkg_selabel_close(void); /* from trigproc.c */ enum trigproc_type { - /** Opportunistic trigger processing. */ - TRIGPROC_TRY, + /** Opportunistic deferred trigger processing. */ + TRIGPROC_TRY_DEFERRED, + /** Opportunistic queued trigger processing. */ + TRIGPROC_TRY_QUEUED, /** Required trigger processing. */ TRIGPROC_REQUIRED, }; diff --git a/src/trigproc.c b/src/trigproc.c index 76d901176..5b7066d8a 100644 --- a/src/trigproc.c +++ b/src/trigproc.c @@ -162,7 +162,7 @@ trigproc_run_deferred(void) ensure_package_clientdata(pkg); pkg->clientdata->trigprocdeferred = NULL; - trigproc(pkg, TRIGPROC_TRY); + trigproc(pkg, TRIGPROC_TRY_DEFERRED); pop_error_context(ehflag_normaltidy); } @@ -416,7 +416,7 @@ trigproc(struct pkginfo *pkg, enum trigproc_type type) * requires us to be able to make progress; skip the * package and silently ignore the error due to * unsatisfiable dependencies. */ - if (type == TRIGPROC_TRY) { + if (type == TRIGPROC_TRY_DEFERRED) { varbuf_destroy(&depwhynot); return; } -- Dpkg.Org's dpkg

