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

Bug#543512: update-fonts-alias should skip removed fonts



Theppitak Karoonboonyanan wrote:
> +				push @alias_postinst, "\tsed -i \'\\\\\\\\,/etc/X11/fonts/$f/$package.alias,d\' $alias_exclude";
> +				push @alias_postrm, "\tsed -i \'\\\\\\\\,/etc/X11/fonts/$f/$package.alias,d\' $alias_exclude";

I have a rule of thumb: When you have to put more than two backslashes
in a row in your code, you're doing something wrong.

My first suggestion would be that update-fonts-alias be passed
the file to exclude and handle whatever bookkeeping (exclude list or
whatever) it needs to, instead of requiring maintainer scripts sed it
and get it right. That seems the most maintainable.

Alternatively, putting this code in the autoscript file itself,
and just substituting in the name of the alias file, should eliminate
much of the obvious ugliness.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: