summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--src/configure.c1
-rw-r--r--src/help.c7
3 files changed, 8 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 8b100a6dc..b524ea711 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,8 +38,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
debian/source/patch-header. Closes: #629582
* Changed dpkg-source --after-build to automatically unapply patches that it
has applied during --before-build.
- * Fix one possible cause for the assertion failure "pigp->trigpend_head".
- LP: #798793
+ * Fix two possible causes for the assertion failure "pigp->trigpend_head".
+ LP: #798793, #424358 Closes: #560251
[ Guillem Jover ]
* Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520
diff --git a/src/configure.c b/src/configure.c
index 3ab9905e4..97689c1d9 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -355,6 +355,7 @@ deferred_configure(struct pkginfo *pkg)
NULL);
pkg->eflag = eflag_ok;
+ pkg->trigpend_head = NULL;
post_postinst_tasks(pkg, stat_installed);
}
diff --git a/src/help.c b/src/help.c
index 88fa3969f..fa33b1a5c 100644
--- a/src/help.c
+++ b/src/help.c
@@ -214,8 +214,11 @@ preexecscript(struct command *cmd)
void
post_postinst_tasks(struct pkginfo *pkg, enum pkgstatus new_status)
{
- pkg->trigpend_head = NULL;
- pkg->status = pkg->trigaw.head ? stat_triggersawaited : new_status;
+ if (new_status < stat_triggersawaited)
+ pkg->status = new_status;
+ else
+ pkg->status = pkg->trigaw.head ? stat_triggersawaited :
+ pkg->trigpend_head ? stat_triggerspending : stat_installed;
post_postinst_tasks_core(pkg);
}