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 D09FEDC01FC for ; Sat, 23 Jan 2016 21:09:07 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 682A1DC00AC for ; Sat, 23 Jan 2016 21:09:06 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id c192so65288498lfe.2 for ; Sat, 23 Jan 2016 13:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Myo8MUM1MakbEKv6w341rXrxn4z5PKOsmpEBe6gNPKg=; b=TuNWkYoS22tFbN1wy7dRjrBBPVVh9NgAHV7KanMvNqFv6MErWKJuO8VPvRW/sB36fv mXKI5zaV3v4dVRsfl7DRReKH3v3vFf6nsCzyCa+YavQBCWgssxcdfdYyueoYEJmQwlin 23mDIxhchniPUu6AH5SYPTCsyEPUqDsxmve4mEBG1olVXLTVlY6HfrrTV3mvbvcOX3Ro OT840k8VHC9xtfPvF+Llwf4aLCTcMyJ7PYWo3EsDiskguuvdWsQDsx26ayvXSr7jDspM cNJW4/+OE3zl+UVazfD5W4WtkoIN++mBeKo5VPN5z/rD6+F8+2gAz61AIqOOxxmmBkDS APrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=Myo8MUM1MakbEKv6w341rXrxn4z5PKOsmpEBe6gNPKg=; b=VxVfethkzb/xg+kWUaOa64QYwdFPNLEjxIqtjKp+ORTGnBDkwb5ugB001DvrJwuXaS 2bAab3L7/1kIpkPL2zihmiEMiid4RQDwAYn3YRzngjt3+e/uk90l9jE3BDHc4o0YJx3A AMpTV9YzO41Q6NpSQt3QJylPWd2cFaxXvP2q1/k4E36vYlIQTQUVwCzoqgbilV8LqYHu KdycuZ1ChnOkGnDXpppr2G6zs9uZV/1Ng6TnCAVnmcUvvIW90zgAcvuYn+OAIn8kOos3 HfOT5tk2s4FefaC9C3aeiDW3PAFBiki37azdi+/vxHo+7ojT4Cf9nkXa7wSMms527lhN 9pfQ== X-Gm-Message-State: AG10YOSZeBUuKE+qNK/185fEAFwKk8S79TCH0zRvp4u6Lshaz+7ueLLtORD/g2OxrDLIYg== X-Received: by 10.25.157.135 with SMTP id g129mr3536974lfe.45.1453583345134; Sat, 23 Jan 2016 13:09:05 -0800 (PST) Received: from vostro ([2001:1bc8:101:f402:21a:9fff:fe0c:4022]) by smtp.gmail.com with ESMTPSA id o66sm1645137lfi.36.2016.01.23.13.09.04 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jan 2016 13:09:04 -0800 (PST) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Sat, 23 Jan 2016 23:09:00 +0200 From: Timo Teras To: Isaac Dunham Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] Exactly when do triggers run? Message-ID: <20160123230900.504e2762@vostro> In-Reply-To: <20160123043942.GB8310@newbook> References: <20160123043942.GB8310@newbook> 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 Fri, 22 Jan 2016 20:39:43 -0800 Isaac Dunham wrote: > I'm wondering what causes triggers to run. > Specifically, it seems that a trigger only runs if the watched > files/dirs are changed *by another package*. > Is this expected behavior, or a case of a situation not being > expected? (Or is it simply that the trigger does not exist during the > package upgrades?) Trigger should run when ever package contents touch a file matching trigger specification. When the package with trigger itself gets installed or upgraded, the trigger is fired with all matching files (in package database). The trigger gets list of matching files that were modified as arguments. The triggers are run after all packages have been extracted and files moved into the correct positions. The list of triggers to run is calculated, and the triggers are sorted based on the package dependency order. Finally the are executed serially. > In case you're wondering what I'm trying to do: > I've built ted with both GTK (/usr/bin/Ted) and Motif > (/usr/bin/Ted.motif) versions. > I'd like the Motif version to automatically get a link to it if > there's not already a /usr/bin/Ted binary. > This should happen even if I do > apk add ted > apk add ted-motif > apk del ted > > I've been trying to do this thus: > ted-motif provides ted > ted-motif has a trigger watching /usr/bin/Ted* > > The trigger never goes off. Yes, your watch is for the specific file; and deletion of the file does not fire it currently. For busybox the symlink magic works because busybox monitors the /usr/bin path. > Experimenting, I see that "provides=$PKG" doesn't work like I thought; > it results in $PKG being replaced. > So it should work to simply install Ted.motif as Ted. 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? Or should there be specific syntax on which type of events (add, modify, delete) fire the trigger? /Timo --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---