Bladeren bron

dpkg: Do not ignore trigger cycles for direct dependencies

These are just normal trigger cycles, and as such should not be special
cased. And a strict reading of the triggers spec does not allow them
either. It might make sense to allow self-cycles, but avoiding cycles
from direct dependencies does not make much sense.
Guillem Jover 11 jaren geleden
bovenliggende
commit
54526e8773
2 gewijzigde bestanden met toevoegingen van 2 en 18 verwijderingen
  1. 2 0
      debian/changelog
  2. 0 18
      src/packages.c

+ 2 - 0
debian/changelog

@@ -26,6 +26,8 @@ dpkg (1.17.22) UNRELEASED; urgency=low
   * Fail on trigger processing when it is required to progress. Trigger
     processing is sometimes required and sometimes opportunistic, and we
     should only fail on the former but ignore the latter. Closes: #768852
+  * Do not ignore trigger cycles for direct dependencies, these are just
+    normal trigger cycles, and as such should not be special cased.
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 0 - 18
src/packages.c

@@ -439,24 +439,6 @@ deppossi_ok_found(struct pkginfo *possdependee, struct pkginfo *requiredby,
         debug(dbg_depcondetail, "      triggers-awaited, no fixbytrig");
         goto unsuitable;
       }
-      /* If we have a dependency cycle where a package A awaits trigger
-       * processing and package P has them pending, and both depend on each
-       * other, the dependency cycle breaking code is not smart enough to
-       * break it at the correct place, as the relationship is directional.
-       * So we handle it specially here.
-       *
-       * Otherwise we just defer it, but do not record that it can be fixed
-       * by trigger processing, because we would get into an inifite loop. */
-      if (requiredby == possdependee->trigaw.head->pend) {
-        if (dependtry > 1) {
-          debug(dbg_depcondetail, "      triggers-awaited, fixed by us, "
-                                  "break cycle so ok and found");
-          return FOUND_OK;
-        } else {
-          debug(dbg_depcondetail, "      triggers-awaited, fixed by us, defer");
-          return FOUND_DEFER;
-        }
-      }
       /* We don't check the status of trigaw.head->pend here, just in case
        * we get into the pathological situation where Triggers-Awaited but
        * the named package doesn't actually have any pending triggers. In