Bug#284969: debian-policy: [PROPOSED] stop letting font packages that move stuff around screw people over
On Thu, 9 Dec 2004, Branden Robinson wrote:
> Package: debian-policy
> Version: 3.6.1.1
> Severity: wishlist
> Tags: patch
>
> Rationale: Font packages that stop shipping a font file, or which move a
> font file from one location to another, need to run update-fonts-dir in
> their postrm scripts on upgrade, so that a fonts.dir file with stale
> references to the (re)moved file(s) is not left in an existing directory.
>
> If you don't do this, the result is Bug#252895.
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252895
>
> I am seeking seconds for this proposal.
>
> diff -durN debian-policy-3.6.1.1~/policy.sgml debian-policy-3.6.1.1/policy.sgml
> --- debian-policy-3.6.1.1~/policy.sgml 2004-06-25 16:11:36.000000000 -0500
> +++ debian-policy-3.6.1.1/policy.sgml 2004-12-09 15:43:20.000000000 -0500
> @@ -7899,6 +7899,11 @@
> occur in both the <prgn>postinst</prgn> (for all
> arguments) and <prgn>postrm</prgn> (for all
> arguments except <tt>upgrade</tt>) scripts.
> + Exception: if the font package stops unpacking font files
> + or moves font files from one directory to another across
> + an upgrade, <prgn>update-fonts-dir</prgn> must be invoked
> + in the <prgn>postrm</prgn> script if the <tt>upgrade</tt>
> + argument is specified.
> </item>
I see the problem, but: will the proposed policy really solve it?
Say package foo version 1 has some fonts in some directory A and
version 2 has the same fonts in directory B (so that upgrading from
version 1 to version 2 actually moves the fonts from directory A to
directory B).
IMHO, it should be the postrm of foo version 1 the one that should
unregister fonts from directory A, not the postrm of foo version 2,
which will not run until package foo is upgraded again from version 2.
Would not be easier and cleaner that postrm (or prerm) is always
required to unregister the installed fonts, as we do for the info
files and their indexes? This way every version of a given package
should only be responsible for registering and unregistering its own
fonts in whatever directory they are placed, and we should not need to
do things retroactively and worry about whether or not the fonts were
in the same directory as before or a different one.
So, what would be wrong with this instead?
diff -ru debian-policy-3.6.1.1.orig/policy.sgml debian-policy-3.6.1.1/policy.sgml
--- debian-policy-3.6.1.1.orig/policy.sgml Fri Jun 25 23:11:36 2004
+++ debian-policy-3.6.1.1/policy.sgml Thu Dec 9 23:40:41 2004
@@ -7877,8 +7877,7 @@
<prgn>update-fonts-dir</prgn> on that directory.
This invocation must occur in both the
<prgn>postinst</prgn> (for all arguments) and
- <prgn>postrm</prgn> (for all arguments except
- <tt>upgrade</tt>) scripts.
+ <prgn>postrm</prgn> (for all arguments).
</item>
<item>
Reply to: