The following commit has been merged in the master branch:
commit 354cf7ad828818aa4cef17e801c06e697a8c0616
Author: Colin Watson <[EMAIL PROTECTED]>
Date:   Thu May 29 06:53:34 2008 +0300

    Add a few more comment around obscure bits of trigger handling code

diff --git a/ChangeLog b/ChangeLog
index 112b5bf..fd9fd9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -140,6 +140,12 @@
 
 2008-05-29  Colin Watson  <[EMAIL PROTECTED]>
 
+       * 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  <[EMAIL PROTECTED]>
+
        * lib/triglib.c (trig_incorporate): Fix typo in comment.
 
 2008-05-24  Guillem Jover  <[EMAIL PROTECTED]>
diff --git a/lib/dbmodify.c b/lib/dbmodify.c
index 1eacd5a..cdaa162 100644
--- a/lib/dbmodify.c
+++ b/lib/dbmodify.c
@@ -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;
diff --git a/src/trigproc.c b/src/trigproc.c
index b327f5d..32a6ed5 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -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);
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to