diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2011-06-17 23:53:32 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2011-06-18 00:56:38 +0200 |
commit | 3c3dce24847d0040547aa2a2bd9da5dcca2df0c7 (patch) | |
tree | 6fe925850c9f1e80c9fd2535992dc8202ba91c33 /scripts/Dpkg/Control/Info.pm | |
parent | a36cadba41b19d5908bdfcb658cf01af07c1436a (diff) | |
download | dpkg-3c3dce24847d0040547aa2a2bd9da5dcca2df0c7.tar.gz |
dpkg: ensure that post_postinst_tasks() doesn't introduce bad data
The pending triggers were removed because the postinst has just been
run, unfortunately in some cases it would restore the status to
pending-triggers. This is notably the case when a package is
removed while being in triggers-pending and when the prerm fails.
In fact it was not correct to remove the pending triggers in this
function because only "postinst configure" should clear the pending
triggers. Thus move the removal of the pending triggers to
deferred_configure() in src/configure.c and reset the status
to its "normal" value when the target status is one of triggers-awaited,
triggers-pending or installed.
With this change, it's no longer possible to have a status of
triggers-pending without any pending trigger in trigpend_head.
Note that despite this change, the pending triggers are lost
during a failed removal because dpkg switches the package to
halfconfigured before running "prerm remove" and modstatdb_note()
drops the pending triggers in that situation.
Diffstat (limited to 'scripts/Dpkg/Control/Info.pm')
0 files changed, 0 insertions, 0 deletions