<p dir="ltr">Hi Andreas</p>
<p dir="ltr">Thanks for the report.</p>
<p dir="ltr">/ Ola</p>
<p dir="ltr">Sent from a phone</p>
<div class="gmail_extra"><br><div class="gmail_quote">Den 15 okt 2016 13:33 skrev "Andreas Beckmann" <<a href="mailto:anbe@debian.org">anbe@debian.org</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Package: tigervnc-viewer<br>
Version: 1.6.0+dfsg-2<br>
Severity: important<br>
User: <a href="mailto:debian-qa@lists.debian.org">debian-qa@lists.debian.org</a><br>
Usertags: piuparts<br>
<br>
Hi,<br>
<br>
during a test with piuparts I noticed your package left unowned files on<br>
the system after purge, which is a violation of policy 6.8:<br>
<br>
<a href="https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails" rel="noreferrer" target="_blank">https://www.debian.org/doc/<wbr>debian-policy/ch-<wbr>maintainerscripts.html#s-<wbr>removedetails</a><br>
<br>
The leftover files are actually alternatives that were installed by the<br>
package but have not been properly removed.<br>
<br>
While there is ongoing discussion how to remove alternatives correctly<br>
(see <a href="https://bugs.debian.org/71621" rel="noreferrer" target="_blank">https://bugs.debian.org/71621</a> for details) the following strategy<br>
should work for regular cases:<br>
* 'postinst configure' always installs the alternative<br>
* 'prerm remove' removes the alternative<br>
* 'postrm remove' and 'postrm disappear' remove the alternative<br>
In all other cases a maintainer script is invoked (e.g. upgrade,<br>
deconfigure) the alternatives are not modified to preserve user<br>
configuration.<br>
Removing the alternative in 'prerm remove' avoids having a dangling link<br>
once the actual file gets removed, but 'prerm remove' is not called in<br>
all cases (e.g. unpacked but not configured packages or disappearing<br>
packages) so the postrm must remove the alternative again<br>
(update-alternatives gracefully handles removal of non-existing<br>
alternatives).<br>
<br>
Note that the arguments for adding and removing alternatives differ, for<br>
removal it's 'update-alternatives --remove <name> <path>'.<br>
<br>
Filing this as important as having a piuparts clean archive is a release<br>
goal since lenny.<br>
<br>
>From the attached log (scroll to the bottom...):<br>
<br>
0m27.9s INFO: Warning: Package purging left files on system:<br>
  /etc/alternatives/vncviewer -> /usr/bin/xtigervncviewer        not owned<br>
  /etc/alternatives/vncviewer.1.<wbr>gz -> /usr/share/man/man1/<wbr>xtigervncviewer.1.gz   not owned<br>
  /etc/alternatives/xvncviewer -> /usr/bin/xtigervncviewer       not owned<br>
  /etc/alternatives/xvncviewer.<wbr>1.gz -> /usr/share/man/man1/<wbr>xtigervncviewer.1.gz  not owned<br>
  /usr/bin/vncviewer -> /etc/alternatives/vncviewer      not owned<br>
  /usr/bin/xvncviewer -> /etc/alternatives/xvncviewer    not owned<br>
  /usr/share/man/man1/vncviewer.<wbr>1.gz -> /etc/alternatives/vncviewer.1.<wbr>gz         not owned<br>
  /usr/share/man/man1/<wbr>xvncviewer.1.gz -> /etc/alternatives/xvncviewer.<wbr>1.gz       not owned<br>
<br>
<br>
cheers,<br>
<br>
Andreas<br>
<br>______________________________<wbr>_________________<br>
Pkg-tigervnc-devel mailing list<br>
<a href="mailto:Pkg-tigervnc-devel@lists.alioth.debian.org">Pkg-tigervnc-devel@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-tigervnc-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-tigervnc-devel</a><br></blockquote></div></div>