Comment 30 for bug 401056

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 401056] Re: package sysklogd (not installed) failed to install/upgrade: subprocess installed post-removal script returned error exit status 1

On Tue, Sep 22, 2009 at 01:04:35AM -0000, Michael Terry wrote:
> But apt-get purges sysklogd before running the postinst (or preinst) for
> rsyslog. So it's too late to hack a fix in by then.

Not necessarily.

And, if sysklogd *is* purged before the rsyslog postinst runs, then there's
no cleanup needed - sysklogd postrm removes the user, rsyslog postinst
re-adds the user, no problem at all.

So this should simply be:

  if [ -e /var/lib/dpkg/info/sysklogd.postrm ]; then
   sed -i -e'/deluser/d' /var/lib/dpkg/info/sysklogd.postrm
  fi

in the rsyslog postinst, before the #DEBHELPER# block that starts the
service.

If that *doesn't* work, then there's another bug going on; rsyslog shouldn't
be started before its postinst has run.

> What about adding the sysklogd.postrm hack to update-manager? It has a
> quirk system for upgrading between releases, right?

Could be done, but I think it's better to keep the quirk local to the
affected packages (i.e., we only care about this in the case that sysklogd
is being removed and rsyslog is being installed, so rsyslog can just as well
do the same thing that update-manager would in its stead).

Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>