Bug#801803: epiphany-browser: leaves alternatives after purge: /etc/alternatives/epiphany-browser -> /usr/bin/epiphany-gecko
Andreas Beckmann
anbe at debian.org
Wed Oct 14 17:12:02 UTC 2015
Package: epiphany-browser
Version: 3.16.3-1
Severity: important
User: debian-qa at lists.debian.org
Usertags: piuparts
Control: affects -1 + epiphany-browser-dbg epiphany-gecko epiphany-extensions
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#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 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...):
12m22.6s INFO: Warning: Package purging left files on system:
/etc/alternatives/epiphany-browser -> /usr/bin/epiphany-gecko not owned
This was observed after longterm upgrade tests: lenny -> squeeze
-> wheezy -> jessie -> stretch.
epiphany-browser.preinst has code to clean up old alternatives
on *upgrades*, but in the cases I observe here, the situation is a
little bit different:
* in lenny, epiphany-gecko is installed along some other epiphany-* packages,
but epiphany-browser is *not* installed
* upon distupgrade to squeeze epiphany-browser gets installed as well,
but since this is an initial install and not an upgrade, the
cleanup of the obsolete alternatives is never performed.
cheers,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epiphany-browser-dbg_3.16.3-1.log.gz
Type: application/gzip
Size: 147815 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20151014/1d608947/attachment-0001.bin>
More information about the pkg-gnome-maintainers
mailing list