[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#48646: dpkg-divert is now screwed

Package: dpkg
Severity: important

The changes to dpkg-divert in have broken the maintainer scripts
of the inews package.

The cnews package provides a symlink /usr/bin/inews. The inews package
provides a real binary /usr/bin/inews, so it diverts the cnews symlink
to the file /usr/lib/news/.diverted-symlink-to-inews using:

dpkg-divert --package inews --add --rename \
                --divert /usr/lib/news/.diverted-symlink-to-inews /usr/bin/inews

However, the postrm now fails on the command:

dpkg-divert --package inews --remove --rename \
                --divert /usr/lib/news/.diverted-symlink-to-inews /usr/bin/inews

because the symlink is a dangling symlink:

(Reading database ... 30838 files and directories currently installed.)
Removing inews ...
dpkg - warning: while removing inews, directory `/etc/news' not empty so not removed.
Removing `diversion of /usr/bin/inews to /usr/lib/news/.diverted-symlink-to-inews by inews'
dpkg-divert: error checking `/usr/lib/news/.diverted-symlink-to-inews': No such file or directory
dpkg: error processing inews (--remove):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:

Since this has always worked before I believe this is a bug in dpkg-divert.
If you believe inews is using dpkg-divert incorrectly, please suggest
an alternative solution.


Hamish Moffatt VK3SB. CCs of replies on mailing lists are welcome.

Reply to: