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

Re: trigger question for tex-common



On Mi, 25 Mär 2009, Ian Jackson wrote:
> It's better to have dh_installtex add something very simple like a
> call to another utility with the minimum necessary arguments, than to
> have debhelper contain all of the necessary code and copy it into each
> package.

Sounds reasonable.

> In your scenario, the postinst of texlive-lang-german did something
> where the effect was that
>  * before the call to texlive-lang-german's postinst, the dropping
>    in /etc/texmf/language.d is ignored because texlive-lang-german
>    is not ready;
>  * during the postinst something is done (what?) which means that:

The update-* scripts do the following: They check if a .dpkg-new script
is present for a config file (in /etc/texmf/updmap.d, fmt.d, language.d)
and if that part of the snippet is NOT included in the final config
file.

>  * after this call, the dropping is included in the actually-used
>    configuration file (this latter file is in /var maybe)

If we are talking about the package itself then when the postinst is
called then the .dpkg-new is not present, thus included. The code in
update-fontlang shows:

handle_file()
{
    file="$1"

    # Does the file have a dpkg-new sister?
    if [ -f "${file}.dpkg-new" ]; then
      do_not_include_file "$file"
    else
...


>  * after this actually-used configuration file is updated, some
>    further setup is needed from texlive to make the whole thing
>    work

After the call to update-* the respective texlive program has to be
called, that is
	updmap-sys (for update-updmap)
	fmtutil-sys (for update-language and update-fmtutil)

> If the sysadmin calls update-foobar manually, then dpkg-trigger won't
> be effective, because dpkg-trigger just schedules work to be done
> later by dpkg before dpkg exits.  If dpkg isn't running, the work will
> be deferred indefinitely.  The best answer to this is to have two

So that is already fine, or? So if root is calling
	update-updmap
and that script calls
	dpkg-trigger ...
*nothing* happens even when calling
	dpkg --configure -a
afterwards?

> different scripts or two different invocations: one for the postinst,
> which does dpkg-trigger, and one for sysadmins, which actually does
> the work.  The former invokes the latter via the triggers mechanism,

Hmm, I don't want to add another script calling another script. I think
that should be handled all by update-* scripts itself. Especially, since
all our update-* scripts are in fact only one script where some initial
settings differ.

> I think that if you can explain the machinery to me I should be
> explain how it should be represented to dpkg.

Hope that was enough explanation.

I will now work on implementing the whiole stuff as normal triggers
called texmf-* and that the postinst of package using it simply call the
update-* scripts.

Thanks for your input.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SPITTAL OF GLENSHEE (n.)
That which has to be cleaned off castle floors in the morning after a
bagpipe contest or vampire attack.
			--- Douglas Adams, The Meaning of Liff


Reply to: