The following commit has been merged in the sid branch:
commit 667bae316a302c0f62e5e38a6c791a62785af4b2
Author: Raphaël Hertzog <[email protected]>
Date:   Thu Oct 6 15:32:36 2011 +0200

    dpkg: fix trigger setup code to not reset the status of unconfigured 
packages
    
    The change in commit a36cadba41b19d5908bdfcb658cf01af07c1436a was wrongly
    assuming that all packages would be in one of the states
    triggers-awaited, triggers-pending or installed when
    trig_transitional_activate kicks in.
    
    That is not the case and the status reset should hence only be done when
    the current status is already such that the trigger information are
    meaningful. transitional_interest_callback_ro() is already taking care
    to not add anything in the Triggers-Pending field when the status
    is such that it would not make sense.
    
    Reported-by: Hector Oron <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index 6554462..cd32353 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ dpkg (1.16.1.1) UNRELEASED; urgency=low
   * Stop outputting build flags in dpkg-buildpackage as it confuses
     maintainers who are overriding them in debian/rules and who
     are not seeing the expected value in the build log.
+  * Fix trigger setup code to not reset the status of packages
+    when they are in a status different from triggers-awaited,
+    triggers-pending or installed. Closes: #644492
 
   [ Guillem Jover ]
   * Change dpkg-buildflags to set preprocessor option -D_FORTIFY_SOURCE=2
diff --git a/src/trigproc.c b/src/trigproc.c
index 862740b..154a2f3 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -393,6 +393,8 @@ trig_transitional_activate(enum modstatdb_rw cstatus)
                 * be written down. This should never happen in theory but
                 * can happen if you restore an old status file that is
                 * not in sync with the infodb files. */
+               if (pkg->status < stat_triggersawaited)
+                       continue;
                pkg->status = pkg->trigaw.head ? stat_triggersawaited :
                              pkg->trigpend_head ? stat_triggerspending :
                              stat_installed;

-- 
dpkg's main repository


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

Reply via email to