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

Re: dh_installtexfonts in tex-common, new usage



Norbert Preining <preining@logic.at> wrote:

>>     grep for the magic comment. If present, do nothing; if absent, add
>>     it at the top of the .cfg file, along with the warning & explaining
>>     blurb.
>
> This is already implemented and submitted. If the magic comment is
> present, then nothing is added, if it is not present, warning + header
> is added to the top of the file.

Perfect.

>> To my taste, it offers too many possibilities to do the same thing. For
>
>>From /usr/share/doc/debhelper/PROGRAMMING.gz

[...]

> This is the reason why I implemented it that way.

I understand, and cautiously wrote "To my taste" before offering my
opinion (which is not only mine, when it comes to the general complaint
about "little files" you have to lookup when inspecting a package).

:-)

I can live with it, as long as I can specify several .cfg files and
their priorities. BTW, several files with different priorities need some
special treatment to avoid inserting several times the snippets in
postinst and postrm, as Ralf wrote. What do you do about that?

> One last remark: On installation time the comments from the autoscripts
> files postinst-texfonts and postrm-texfonts are now all stripped
> (tex-common/debian/rules:
> grep -v '^[ \t]*#' scripts/postrm-texfonts > $(INSTDIR)/usr/share/debhelper/autoscripts
> grep -v '^[ \t]*#' scripts/postinst-texfonts > $(INSTDIR)/usr/share/debhelper/autoscripts
> ) so that they don't clutter the actual postinst files. But I want to
> leave the comments in the original files so that we know what we are
> doing. Hope this is ok for everyone.

OK. The grep method is not bullet proof (think multiline strings and
things like cat >file <<EOF
# bla
# bla
EOF
) but this can be documented in a comment at the top of
postinst-texfonts and postrm-texfonts so that whoever modifies these
files doesn't fall into this trap.

-- 
Florent



Reply to: