Page MenuHomePhorge

Debian: error removing roundcubemail
Closed, ResolvedPublic

Description

I'm running kolan on Debian 10, with roundcubemail on Debian 11/12 connected to the kolab imap server.

$ dpkg -l roundcubemail
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-============================================================
ii  roundcubemail               1:1.5.4.6-1~kolab1 all          skinnable AJAX based webmail solution for IMA>

I've tried to remove the package roundcubemail from my testsystem:
[manually translated into english]

Removing roundcubemail (1:1.5.4.6-1~kolab1) ...
/var/lib/dpkg/info/roundcubemail.prerm: 11: reload_apache: not found
dpkg: Error handling package roundcubemail (--remove):
»installed pre-removal-Script of package roundcubemail«-Subprocess returned error code 127

The prerm script in /var/lib/dpkg/info/roundcubemail.prerm contains:

if [ "$1" = "remove" ]; then
    if [ ! -f "/etc/plesk-release" ]; then
        a2dissite roundcubemail.conf > /dev/null || true
        reload_apache restart
    fi
fi

There isn't a command reload_apache on Debian 10 and newer.
I guess that "service apache2 reload" should work fine.

Details

Ticket Type
Task

Event Timeline

machniak subscribed.

This can be found in preinst and postinst scripts and should be copied to prerm script.

reload_apache()
{
    if apache2ctl configtest 2>/dev/null; then
        invoke-rc.d apache2 $1 || true
    else
        echo "Your apache2 configuration is broken, so we're not restarting it for you."
    fi
}
machniak lowered the priority of this task from Needs Triage to Normal.Sep 27 2023, 12:27 PM
machniak added projects: Roundcube, Kolab 16.

Fix proposed in https://obs.kolabsys.com/request/show/3261. @machniak, @mollekopf, could you please take a look and push it through to Kolab:16 if it's okay?

Superseded by https://obs.kolabsys.com/request/show/3262, which includes an additional fix for the upgrade path by adding a conflict with roundcubemail-plugins-kolab.