[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

package replacement and lack of disappearing...

I'm trying to find out why package replacement is working as expected...

I've got two packages, either one of which can be installed at a time:

	Replaces: mail-transport-agent, sendmail-tls
	Provides: mail-transport-agent
	Conflicts: mail-transport-agent

	Replaces: mail-transport-agent, sendmail
	Provides: mail-transport-agent
	Conflicts: mail-transport-agent

When installing, say sendmail-tls over sendmail,
# dpkg --install *-tls*.deb
Selecting previously deselected package sendmail-tls.
dpkg: considering removing sendmail in favour of sendmail-tls ...
dpkg: yes, will remove sendmail in favour of sendmail-tls.
Removing sendmail in-favour sendmail-tls(8.11.5+8.12.0.Beta17-0) <= debugging

# ls -l /var/lib/dpkg/info/sendmail.*
-rw-r--r--  1 root root    0 Aug  2 14:35 /var/lib/dpkg/info/sendmail.list
-rwxr-xr-x  1 root root 3537 Aug  2 13:53 /var/lib/dpkg/info/sendmail.postrm*

Things look good, except that I expected sendmail to disappear !!!

# dpkg --purge sendmail
(Reading database ... 11532 files and directories currently installed.)
Removing sendmail ...
Purging configuration files for sendmail ...
Purging replaced package sendmail, nothing to do... <= postrm debugging

At this point, /etc/init.d/sendmail has been deleted !

But... the postrm looks like this:
case "$1" in
		# We're *really* purging; neither sendmail nor sendmail-tls
        # is currently installed
        if [ -f /usr/lib/sm.bin/sendmail ]; then
            echo "Purging replaced package $PACKAGE, nothing to do...";
            exit 0;

# NOTE WELL:  If we fall through here during purge, update-rc.d will be
#             called with remove... and /etc/init.d/$PACKAGE goes away!
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
    update-rc.d sendmail remove >/dev/null
# End automatically added section

	1) Why didn't the original package (sendmail) disappear ?
	2) How did /etc/init.d/sendmail get purged ?
Rick Nelson
* HomeySan waits for the papa john's pizza to show up
<ravenos> mm. papa john's.
<HomeySan> hopefully they send the cute delivery driver
<ravenos> they dont have that here.
<Dr_Stein> why? you gonna eat the driver instead?

Reply to: