[Pkg-tcltk-devel] Bug#720143: {tcl, tk}8.5: leaves alternatives after purge: /usr/bin/tclsh, /usr/bin/wish

Andreas Beckmann anbe at debian.org
Mon Aug 19 07:23:46 UTC 2013


Package: tcl8.5,tk8.5
Version: 8.5.14-4
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:

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.

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).

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...):

0m34.4s INFO: Warning: Package purging left files on system:
  /etc/alternatives/tclsh -> /usr/bin/tclsh8.5	 not owned
  /etc/alternatives/tclsh.1 -> /usr/share/man/man1/tclsh8.5.1.gz	 not owned
  /usr/bin/tclsh -> /etc/alternatives/tclsh	 not owned
  /usr/share/man/man1/tclsh.1.gz -> /etc/alternatives/tclsh.1	 not owned

0m34.6s INFO: Warning: Package purging left files on system:
  /etc/alternatives/tclsh -> /usr/bin/tclsh8.5	 not owned
  /etc/alternatives/tclsh.1 -> /usr/share/man/man1/tclsh8.5.1.gz	 not owned
  /etc/alternatives/wish -> /usr/bin/wish8.5	 not owned
  /etc/alternatives/wish.1 -> /usr/share/man/man1/wish8.5.1.gz	 not owned
  /usr/bin/tclsh -> /etc/alternatives/tclsh	 not owned
  /usr/bin/wish -> /etc/alternatives/wish	 not owned
  /usr/share/man/man1/tclsh.1.gz -> /etc/alternatives/tclsh.1	 not owned
  /usr/share/man/man1/wish.1.gz -> /etc/alternatives/wish.1	 not owned


The same happens in the 8.4 and 8.6 packages.


cheers,

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcl8.5_8.5.14-4.log.gz
Type: application/x-gzip
Size: 10022 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-tcltk-devel/attachments/20130819/22c0299b/attachment.bin>


More information about the Pkg-tcltk-devel mailing list