Package: dpkg
Version: 1.18.24
dpkg doesn't check if files from another package were moved with
dpkg-divert.
I try to install my package containing this preinst script:
case "$1" in
install)
dpkg-divert --remove --package "titanium-desktop" --rename \
/etc/xdg/openbox/autostart
dpkg-divert --remove --package "titanium-desktop" --rename \
/etc/xdg/openbox/rc.xml
;;
esac
But dpkg complains about renamed file:
Unpacking titanium-desktop-full (1.0.0) ...
dpkg: error processing archive
/opt/deb/titanium-desktop-full_1.0.0-1_all.deb (--install):
trying to overwrite '/etc/xdg/openbox/autostart', which is also in package
openbox 3.6.1-4
The file '/etc/xdg/openbox/autostart' is indeed renamed to
'autostart.disabled' by dpkg-divert as shown below:
root@ubuntu-work:/# ls /etc/xdg/openbox/
autostart.disabled environment menu.xml rc.xml.disabled
With Debian 8 Jessie the package was installed without error. This error
reproduces only with Debian 9 Stretch.
I am using Debian GNU/Linux 9 installed through debootstrap.