Control: found -1 1.1.2+dfsg-6 Control: fixed -1 1.6.0+dfsg-1 14.09.2013 17:36, Andreas Beckmann wrote: > Package: qemu > Version: 1.6.0+dfsg-1 > Severity: important > User: debian...@lists.debian.org > Usertags: piuparts > > Hi, > > during a test with piuparts I noticed your package left unowned files on > the system after purge, which is a violation of policy 6.8: > > http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails > > The leftover files are actually alternatives that were installed by the > package but have not been properly removed.
This is a bug filed against version 1.6 of qemu, but actual log provided shows the issue for version 1.2 (wheezy). In wheezy we modified alternatives handling, and it should not left unowned alternatives anymore. However this was done differently: > While there is ongoing discussion how to remove alternatives correctly > (see http://bugs.debian.org/71621 for details) the following strategy > should work for regular cases: > * 'postinst configure' always installs the alternative > * 'prerm remove' removes the alternative > * 'postrm remove' and 'postrm disappear' remove the alternative > In all other cases a maintainer script is invoked (e.g. upgrade, > deconfigure) the alternatives are not modified to preserve user > configuration. > Removing the alternative in 'prerm remove' avoids having a dangling link > once the actual file gets removed, but 'prerm remove' is not called in > all cases (e.g. unpacked but not configured packages or disappearing > packages) so the postrm must remove the alternative again > (update-alternatives gracefully handles removal of non-existing > alternatives). Right now, alternative is being removed in prerm only, for remove | deconfigure | failed-upgrade cases. Actually I don't remember anymore why it was done this way, but I researched this topic and asked for suggestions. I'd not introduce another script (those are auto-generated from .in files, and the result becomes rather messy (even more messy without autogeneration), if that's possible. At least right now it works for regular cases. As you noted, prerm might not be called in all cases. I'm not sure it is worth the effort to fix those remaining cases however, especially if this causes extra pain to handle. But you might have a different opinion ;) I'm tagging the bug with appropriate (hopefully) versions. Thanks, /mjt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org