Re: [alpine-aports] Exactly when do triggers run?
On Sat, 23 Jan 2016 23:09:00 +0200
Timo Teras <timo.teras_at_iki.fi> wrote:
> On Fri, 22 Jan 2016 20:39:43 -0800
> Isaac Dunham <ibid.ag_at_gmail.com> wrote:
> > I'm wondering what causes triggers to run.
> Currently file deletion does not fire trigger if the match is for the
> file. It does however fire if the match is against a directory.
> I suppose the above could be considered a bug. It would make more sense
> to fire the trigger, and give the deleted file as argument and leave it
> up to the trigger to figure out that the file does not exist anymore.
> _at_ncopa Do you think we have triggers that'd break if we add the
> match for deleted files?
No, I don't think any triggers would break if we add match for deleted
files. I think all triggers we have so far only watches directories, so
we should be good.
> Or should there be specific syntax on which type of events (add,
> modify, delete) fire the trigger?
With the above you could easily detect if its deleted or add/modified.
I would think that is enough for most cases? I suspect that you will in
almost all cases want to handle 'modified' the same way as 'add'.
If this shows to not be enough, then maybe add that via env var in
future or similar?
Received on Mon Jan 25 2016 - 08:51:31 GMT