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

Re: trigger question for tex-common



Norbert Preining writes ("Re: trigger question for tex-common"):
> On Mi, 25 Mär 2009, Ian Jackson wrote:
> > You probably don't want to call dpkg-trigger directly in
> > texlive-lang-german's postinst.
> 
> Why? It would be added by dh_installtex.

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.

That way when the machinery changes, you can often just change the
central package and not need to rebuild everything.  And of course not
everyone uses debhelper.

> > Presumably texlive-lang-german calls some script from tex-common to do
> > this final setup ?  That is, the final setup which is also read by
> > update-* ?  In which case, update-* should (when run from a package's
> > postinst) call dpkg-trigger.
> 
> Hmmm, currently the calls to update-* are done in the trigger action.
> But we could switch dh_installtex to place simply the update-* calls
> into the postinst of packages, and then update-* scripts in turn are
> calling dpkg-trigger.

I think we are talking at cross purposes.

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:
 * after this call, the dropping is included in the actually-used
   configuration file (this latter file is in /var maybe)
 * after this actually-used configuration file is updated, some
   further setup is needed from texlive to make the whole thing
   work
?

Is that correct ?  Can you please give the names of these various
steps ?  That way I'll be able to talk about them without confusion.

> Is there a reason to call dpkg-trigger *only* when update-* is called
> from maintainer scripts? Or is it ok to call dpkg-trigger if root is
> calling dpkg-trigger from a shell?

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
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,
so the latter is called in the interested packages's postinst.

> I will not be able to work on the bunch without my laptop, but maybe
> someone else from the TeX group here might get his hands dirty.

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

Ian.


Reply to: