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=b5c50b3c6f0739f45aaa03afa3e5c857e7895c8c

commit b5c50b3c6f0739f45aaa03afa3e5c857e7895c8c
Author: Guillem Jover <[email protected]>
AuthorDate: Mon May 13 03:36:03 2019 +0200

    dpkg: Introduce a new dependency try level for trigger cycle checks
    
    This new dependtry level will also check trigger cycles on trigger
    process deferral due to unsatisfiable dependencies.
    
    Closes: #928429
---
 debian/changelog |  3 +++
 src/main.h       | 13 +++++++++----
 src/trigproc.c   |  8 +++++---
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3d97a0111..2a0615f36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ dpkg (1.19.7) UNRELEASED; urgency=medium
   * dpkg: Set the force defaults before loading the config file, otherwise we
     incorrectly override them. Regression introduced in dpkg 1.19.5.
     Closes: #928671
+  * dpkg: Split the trigger dependtry into two, the second of which will be
+    the one checking trigger cycles when deferring trigger processing due to
+    unsatisfiable dependencies. Closes: #928429
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).
diff --git a/src/main.h b/src/main.h
index e4a251969..3418c7bcc 100644
--- a/src/main.h
+++ b/src/main.h
@@ -234,18 +234,23 @@ void deferred_configure(struct pkginfo *pkg);
  *   Start processing triggers if necessary.
  *   Do as for try 2.
  *
- * Try 4 (only if --force-depends-version):
+ * Try 4:
+ *   Same as for try 3, but check trigger cycles even when deferring
+ *   processing due to unsatisfiable dependencies.
+ *
+ * Try 5 (only if --force-depends-version):
  *   Same as for try 2, but don't mind version number in dependencies.
  *
- * Try 5 (only if --force-depends):
+ * Try 6 (only if --force-depends):
  *   Do anyway.
  */
 enum dependtry {
        DEPEND_TRY_NORMAL = 1,
        DEPEND_TRY_CYCLES = 2,
        DEPEND_TRY_TRIGGERS = 3,
-       DEPEND_TRY_FORCE_DEPENDS_VERSION = 4,
-       DEPEND_TRY_FORCE_DEPENDS = 5,
+       DEPEND_TRY_TRIGGERS_CYCLES = 4,
+       DEPEND_TRY_FORCE_DEPENDS_VERSION = 5,
+       DEPEND_TRY_FORCE_DEPENDS = 6,
        DEPEND_TRY_LAST,
 };
 
diff --git a/src/trigproc.c b/src/trigproc.c
index 59e30d143..54b15bbe1 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -407,9 +407,11 @@ trigproc(struct pkginfo *pkg, enum trigproc_type type)
 
                ok = dependencies_ok(pkg, NULL, &depwhynot);
                if (ok == DEP_CHECK_DEFER) {
-                       gaveup = check_trigger_cycle(pkg);
-                       if (gaveup == pkg)
-                               return;
+                       if (dependtry >= DEPEND_TRY_TRIGGERS_CYCLES) {
+                               gaveup = check_trigger_cycle(pkg);
+                               if (gaveup == pkg)
+                                       return;
+                       }
 
                        varbuf_destroy(&depwhynot);
                        enqueue_package(pkg);

-- 
Dpkg.Org's dpkg

Reply via email to