Hi, On Mon, Oct 29, 2018 at 02:00:37PM +0100, Axel Beckert wrote: > Axel Beckert wrote: > > When trying to fix this manually using "dpkg --purge --force-depends" > > to later use "apt install -f", libreoffice-base failed to purge due to > > some (seemingly broken) diversion. Here's my next try after > > libreoffice-common was already successfully purged: > > > > root@localhost:~# dpkg --purge --force-depends libreoffice-base > > > > dpkg: libreoffice-base: dependency problems, but removing anyway as you > > requested: > > libreoffice-report-builder-bin depends on libreoffice-base. > > libreoffice depends on libreoffice-base. > > > > (Reading database ... 63690 files and directories currently installed.) > > Removing libreoffice-base (1:5.2.7-1+deb9u4) ... > > dpkg-divert: error: mismatch on package > > when removing 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc > > to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base' > > found 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to > > /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by --add' > > Please note the "--add" in here. > > In /var/lib/dpkg/diversions, the according entry had "--add" listed as > package name. I fixed the issue by replacing "--add" with > "libreoffice-base" and then the package could be purged. > > So if there never was a dpkg-divert call in the libreoffice maintainer > scripts that was so broken that "--add" had been parsed as package > name, feel free to close this as locally misconfigured system. (I > though can imagine that by e.g. missing quotes around a shell > variable, this could happen if the variable with the package name was > empty for some reason.
Good point. dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --add --rename \ is the call. So indeed, if $DPKG_MAINTSCRIPT_PACKAGE was empty... Now the question is why that happens Now the question is why that happens... Regards, Rene