[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: