On Thu, 17 Jan 2019 15:35:54 +0100 Andreas Beckmann <a...@debian.org> wrote:
>
> Hi,

Hello

>
> 0m33.7s ERROR: FAIL: Broken symlinks:
> /sbin/ebtables-restore -> /usr/sbin/ebtables-restore
> /sbin/ebtables-save -> /usr/sbin/ebtables-save
> /sbin/ebtables -> /usr/sbin/ebtables

I can confirm this.

These symlinks are created by the postinst script of ebtables but are not properly removed by theĀ  pre/postrm one.

The prerm script is doing the following:

if [ "$1" = "remove" ] ; then
    iptables_version=$(dpkg-query -W -f='${Version;3}\n' iptables)
    if [[ "$iptables_version" < 1.8 ]]; then
        LIST="/sbin/ebtables /sbin/ebtables-save /sbin/ebtables-restore"

        for i in $LIST ; do
            if [ -L "$i" ] ; then
                rm $i
            fi
        done
    fi
fi

First remark, shouldn't dpkg --compare-versions be used instead of just the < sign?

Then, these symlinks must also be created/removed in the iptables package itself for this to work, this is not the case ATM. Otherwise, if ebtables is removed and then iptables package is removed, the symlinks will stay on the filesystem forever.

Again all of this needs to be coordinated between ip/eb/arptables packages, could all of this be fixed in a consistent way?

Reply via email to