X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 0A3AADC0309 for ; Mon, 25 Jan 2016 07:51:38 +0000 (UTC) Received: from newmail.tetrasec.net (unknown [74.117.189.116]) by mail.alpinelinux.org (Postfix) with ESMTP id D5AA6DC0156 for ; Mon, 25 Jan 2016 07:51:37 +0000 (UTC) Received: from ncopa-desktop.alpinelinux.org (103.63.200.37.customer.cdi.no [37.200.63.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id F3B045A112D; Mon, 25 Jan 2016 07:51:36 +0000 (GMT) Date: Mon, 25 Jan 2016 08:51:31 +0100 From: Natanael Copa To: Timo Teras Cc: Isaac Dunham , alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] Exactly when do triggers run? Message-ID: <20160125085131.54ae8728@ncopa-desktop.alpinelinux.org> In-Reply-To: <20160123230900.504e2762@vostro> References: <20160123043942.GB8310@newbook> <20160123230900.504e2762@vostro> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Sat, 23 Jan 2016 23:09:00 +0200 Timo Teras wrote: > On Fri, 22 Jan 2016 20:39:43 -0800 > Isaac Dunham 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. > > @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? -nc --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---