[pacman-dev] [RFC] alpmtrigger: triggering events after all packages got installed...

Marc - A. Dahlhaus mad at wol.de
Sat Sep 12 08:19:51 EDT 2009


Xavier schrieb:
> On Sat, Sep 12, 2009 at 1:21 PM, Marc - A. Dahlhaus <mad at wol.de> wrote:
> 
>> Another problem with hooks and the points on which they should be executed
>> is that if you have a large transaction in which some packages add hooks
>> that are needed for packages that are installed in the same transaction need
>> to be parsed on installation time to give you the option to run the hooks on
>> the point they should be executed. Also what about a package that wants hook
>> X needs to be installed before the hook X is added by another package? Would
>> be a classic chicken-egg problem i think. Trigges like i proposed them don't
>> have this problem as they get executed after the transaction is completed.
>> At this point all triggers are where they should be.
>>
> 
> We also wanted to support actions which are only executed after the
> transaction is completed :
> http://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks#Types_of_Hook
> 
> The differences if that they would be triggered automatically by a
> file, instead of manually triggered by the packages themselves.


I actually have read the text on the wiki and i know that there is a 
transaction hook mentioned there.

Did you think about the case where a common task could be wanted if 
there isn't any filename based rule that could fire it up?

An example could be that a package adds some functionality that is an 
optional dependency for a job. If the dependency is not installed on the 
jobs first execution than some thinks are not done. If the optional 
dependency get installed at a later point it could ask for the trigger 
of the dependency and activate the missing things.

I argue that they should be differently handled because of situation 
where the "file X got installed so we need to start Y" will not work.

Marc


More information about the pacman-dev mailing list