[Pkg-fonts-devel] Dropping defoma use in TTF/OTF font packages?

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Jan 7 07:16:53 UTC 2010

Sorry to resurrect an old thread here, but i'm having trouble making use
of joss' advice here:

On 11/10/2009 10:38 AM, Josselin Mouette wrote:
> packages which remove the call to dh_installdefoma need to
> add something like this in their preinst:
> VERSION={first version with defoma being removed}
> FILE=/etc/defoma/hints/ttf-lao.hints
> if [ "$1" = remove ] && dpkg --compare-versions "$2" lt-nl $VERSION;
> then
>     if [ -x /usr/bin/defoma-font ]; then
>         defoma-font purge-all $FILE
>     fi
>     rm_conffile $FILE
> fi

I'm having trouble understanding why the test is checking

  [ "$1" = remove ]

instead of

  [ "$1" = upgrade ] || [ "$1" = install ]

Isn't this operation relevant on upgrade/install, instead of on removal?

My reasoning is: upgrade covers the normal upgrade path case.  install
covers the case where an older package was earlier removed (not purged,
so the conffile is still present), and a newer version is being installed.

Why should preinst testing for "remove" here?  What am i misunderstanding?

	--dkg, confused as ever

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 891 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/attachments/20100107/c4fb7759/attachment.pgp>

More information about the Pkg-fonts-devel mailing list