Procházet zdrojové kódy

dpkg: Reset trigger cycle tracking on unsatisfied dependencies during trigproc

If we are not going to process triggers due to an unsatisfied
dependency, we should reset the trigger cycle tracking information
so that we do not end up reporting bogus cycle errors.

Closes: #771730
Guillem Jover před 11 roky
rodič
revize
f58eee9edb
2 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 2 0
      debian/changelog
  2. 7 0
      src/trigproc.c

+ 2 - 0
debian/changelog

@@ -3,6 +3,8 @@ dpkg (1.17.23) UNRELEASED; urgency=low
   [ Guillem Jover ]
   [ Guillem Jover ]
   * Use a matching group instead of ${^MATCH} in s/// in dselect build script.
   * Use a matching group instead of ${^MATCH} in s/// in dselect build script.
   * Skip tar extractor tests if tar is not GNU tar >= 1.27.
   * Skip tar extractor tests if tar is not GNU tar >= 1.27.
+  * Reset the trigger cycle tracking on unsatisfied dependencies during
+    trigger processing. Closes: #771730
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Basque (Iñaki Larrañaga Murgoitio). Closes: #771893
   * Basque (Iñaki Larrañaga Murgoitio). Closes: #771893

+ 7 - 0
src/trigproc.c

@@ -385,6 +385,13 @@ trigproc(struct pkginfo *pkg, enum trigproc_type type)
 			enqueue_package(pkg);
 			enqueue_package(pkg);
 			return;
 			return;
 		} else if (ok == DEP_CHECK_HALT) {
 		} 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 processig, nothing
 			/* When doing opportunistic trigger processig, nothing
 			 * requires us to be able to make progress; skip the
 			 * requires us to be able to make progress; skip the
 			 * package and silently ignore the error due to
 			 * package and silently ignore the error due to