Bug#983892: libpetsc64-complex3.14-dev: leaves alternatives after purge: /etc/alternatives/*petsc64*
Andreas Beckmann
anbe at debian.org
Tue Mar 2 21:49:52 GMT 2021
Package: libpetsc64-complex3.14-dev
Version: 3.14.4+dfsg1-1
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/ch-maintainerscripts.html#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...):
1m18.7s INFO: Warning: Package purging left files on system:
/etc/alternatives/PETSc64.pc -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex/lib/pkgconfig/PETSc.pc not owned
/etc/alternatives/libpetsc64.so -> /usr/lib/x86_64-linux-gnu/libpetsc64_complex.so.3.14.4 not owned
/etc/alternatives/petsc64 -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex not owned
/etc/alternatives/petsc64-3.14 -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex not owned
/etc/alternatives/petsc64-octave -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex/share/petsc/matlab not owned
/etc/alternatives/petsc64.pc -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex/lib/pkgconfig/petsc.pc not owned
/etc/alternatives/petsc64include -> /usr/lib/petscdir/petsc64-3.14/x86_64-linux-gnu-complex/include not owned
/usr/include/petsc64 -> /etc/alternatives/petsc64include not owned
/usr/lib/petsc64 -> /etc/alternatives/petsc64 not owned
/usr/lib/petscdir/ owned by: libpetsc64-complex3.14-dev:amd64
/usr/lib/petscdir/64-3.14 -> /etc/alternatives/petsc64-3.14 not owned
/usr/share/octave/ owned by: libpetsc64-complex3.14-dev:amd64
/usr/share/octave/site/ owned by: libpetsc64-complex3.14-dev:amd64
/usr/share/octave/site/m/ owned by: libpetsc64-complex3.14-dev:amd64
/usr/share/octave/site/m/petsc64 -> /etc/alternatives/petsc64-octave not owned
cheers,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpetsc64-complex3.14-dev_3.14.4+dfsg1-1.log.gz
Type: application/gzip
Size: 26128 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210302/83e0fda9/attachment-0001.gz>
More information about the debian-science-maintainers
mailing list