]> err.no Git - dpkg/commitdiff
Add a few more comment around obscure bits of trigger handling code
authorColin Watson <cjwatson@debian.org>
Thu, 29 May 2008 03:53:34 +0000 (06:53 +0300)
committerGuillem Jover <guillem@debian.org>
Thu, 19 Jun 2008 05:06:05 +0000 (08:06 +0300)
ChangeLog
lib/dbmodify.c
src/trigproc.c

index 112b5bfe36c99d1daa821a088b0779413d70a5f8..fd9fd9a91b8be507f62bf65812dda80f898c91f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        dpkg is unable to create a file so that it also refers to the real
        filename instead of the non-diverted name only.
 
+2008-05-29  Colin Watson  <cjwatson@debian.org>
+
+       * lib/dbmodify.c (modstatdb_note): Add a comment around obscure bits
+       of trigger handling code.
+       * src/trigproc.c (trigproc): Likewise.
+
 2008-05-29  Colin Watson  <cjwatson@debian.org>
 
        * lib/triglib.c (trig_incorporate): Fix typo in comment.
index 1eacd5a672e9d7ebe6faebe6a6034e37ae9a2c1b..cdaa1624603822577a30bcc85f83c62412260ce3 100644 (file)
@@ -251,6 +251,9 @@ void modstatdb_note(struct pkginfo *pkg) {
 
   onerr_abort++;
 
+  /* Clear pending triggers here so that only code that sets the status
+   * to interesting (for triggers) values has to care about triggers.
+   */
   if (pkg->status != stat_triggerspending &&
       pkg->status != stat_triggersawaited)
     pkg->trigpend_head = NULL;
index b327f5d3d9edb29ceb090f815b8d6fa8791100ea..32a6ed523bf76c7c8f1c300db7675b66bdd91bff 100644 (file)
@@ -295,6 +295,9 @@ trigproc(struct pkginfo *pkg)
                }
                varbufaddc(&namesarg, 0);
 
+               /* Setting the status to halfconfigured
+                * causes modstatdb_note to clear pending triggers.
+                */
                pkg->status = stat_halfconfigured;
                modstatdb_note(pkg);