Re: Finding out in postinst whether some other package is configured
Anthony DeRobertis <email@example.com> writes:
> Frank KÃ¼ster wrote:
>> In the particular case, the reason is something else: If the recommended
>> package B (tetex-bin) is there, it makes sense to run one of its
>> executables (mktexlsr, updmap) to register the files of package A (any TeX
>> font package). This is a time-consuming process. However, if B is
>> installed but unconfigured, we can save this time because when B is
>> configured, it will run these executables, anyway, and doing this also
>> will pick up package A's files.
> Sounds to me like package B should be performing these optimizations,
> not package A.
In the past people have suggested adding something to dpkg that allows
one to schedule a script to be run _once_ at the end of a dpkg
session. E.g. every tex font package would call:
The same would work for manpages, info files, menu entries,
... whatever comes in chunks from multiple packages.
dpkg-run-once would add the command to a journal (unless it already
contains it) and dpkg would execute that journal at the end of its
livetime. For use in apt/aptitude/dselect executing the journal could
be suspended until the last dpkg run.