[Pkg-pascal-devel] Bug#886926: fp-compiler-3.0.4: leaves alternatives after purge
Andreas Beckmann
anbe at debian.org
Thu Jan 11 12:25:32 UTC 2018
Package: fp-compiler-3.0.4
Version: 3.0.4+dfsg-12
Severity: important
User: debian-qa at 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:
https://www.debian.org/doc/debian-policy/#details-of-removal-and-or-configuration-purging
The leftover files are actually alternatives that were installed by the
package but have not been properly removed.
While there is ongoing discussion how to remove alternatives correctly
(see https://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).
Note that the arguments for adding and removing alternatives differ, for
removal it's 'update-alternatives --remove <name> <path>'.
Filing this as important as having a piuparts clean archive is a release
goal since lenny.
>From the attached log (scroll to the bottom...):
2m32.9s ERROR: FAIL: Package purging left files on system:
/etc/alternatives/fpc -> /usr/bin/x86_64-linux-gnu-fpc-3.0.4 not owned
/etc/alternatives/fpc-depends -> /usr/bin/fpc-depends-3.0.4 not owned
/etc/alternatives/fpc-depends.1.gz -> /usr/share/man/man1/fpc-depends-3.0.4.1.gz not owned
/etc/alternatives/fpc.1.gz -> /usr/share/man/man1/fpc-3.0.4.1.gz not owned
/etc/alternatives/fpcres -> /usr/bin/x86_64-linux-gnu-fpcres-3.0.4 not owned
/etc/alternatives/fpcres.1.gz -> /usr/share/man/man1/fpcres-3.0.4.1.gz not owned
/etc/alternatives/pc -> /usr/bin/fpc not owned
/etc/alternatives/pc.1.gz -> /usr/share/man/man1/fpc.1.gz not owned
/etc/alternatives/ppcx64 -> /usr/lib/x86_64-linux-gnu/fpc/3.0.4/ppcx64 not owned
/etc/alternatives/ppcx64.1.gz -> /usr/share/man/man1/ppcx64-3.0.4.1.gz not owned
/usr/bin/fpc -> /etc/alternatives/fpc not owned
/usr/bin/fpc-depends -> /etc/alternatives/fpc-depends not owned
/usr/bin/fpcres -> /etc/alternatives/fpcres not owned
/usr/bin/pc -> /etc/alternatives/pc not owned
/usr/bin/ppcx64 -> /etc/alternatives/ppcx64 not owned
/usr/share/man/man1/fpc-depends.1.gz -> /etc/alternatives/fpc-depends.1.gz not owned
/usr/share/man/man1/fpc.1.gz -> /etc/alternatives/fpc.1.gz not owned
/usr/share/man/man1/fpcres.1.gz -> /etc/alternatives/fpcres.1.gz not owned
/usr/share/man/man1/pc.1.gz -> /etc/alternatives/pc.1.gz not owned
/usr/share/man/man1/ppcx64.1.gz -> /etc/alternatives/ppcx64.1.gz not owned
cheers,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fp-compiler-3.0.4_3.0.4+dfsg-12.log.gz
Type: application/gzip
Size: 10320 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20180111/0ad0b127/attachment.bin>
More information about the Pkg-pascal-devel
mailing list