dh_installdebconf sections in postrms cause duplicate purging
(cc:ed to #163293)
dh_installdebconf inserts the following lines into the postrm (*):
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
Interestingly, the line ". /usr/share/debconf/confmodule" can
result in the postrm being called again with the same arguments.
A problem with this is that any lines that precede the added
bit (*) get executed a second time. If the postrm is doing a
purge, then any preceding purgative actions are performed twice.
Just to see how serious this problem is, I looked at all the
postrms on my system and I found that a lot of postrms end
up running a lot of code more than once. In some cases,
"update-rc.d remove" is called twice, etc. No harm done,
I suppose, except for time wasted.
Still, this should be fixed. One fix is for the maintainers
to put dh_installdebconf early in the build rule so that the
added bit (*) occurs before anything else in the postrm.
Implementing this fix would require a mass bug filing against
all packages which run dh_installdebconf later.
Comments?
// Thomas Hood
Contain code that runs more than once
-------------------------------------
binutils
gmc
linuxlogo
xserver-common
xserver-xfree86
Contain "purge" code that runs more than once
---------------------------------------------
bottlerocket
console-common
cupsys-bsd
dhelp
dosemu
dwww
hotplug
hwtools
ifupdown
irda-common
libpaperg
libwine
man-db
mozilla-browser
netbase
netkit-inetd
playmidi
popularity-contest
postfix
powermgmt-base
powertweakd
psfontmgr
samba-common
setserial
ssh
thinkpad-base
webmin
wine
x-ttcidfont-conf
Contain superfluous code
------------------------
cvs
iptables
setserial
Reply to: