On Fri, 2017-06-30 at 20:11 +0200, Olaf Hering wrote:
Am Fri, 30 Jun 2017 16:17:43 +0200 schrieb Dominique Leuenberger / DimStar <dimstar@opensuse.org>:
As many of you are certainly aware, RPM 4.13.0 brought, amongst other things, the ability to use file triggers (i.e. run a script whenever a package installs/removes a file to a specific directory)
"a script" as in a single, global script per "file"? Or rather "at least one script" per "file"? In case of the latter: what defines the ordering? Would a pkg B be able to override the system provided pkg A?
'a script' is an rpm scriptlet - defined in the .spec file (as were %post scripts) The file trigger is defined 'per location to be monitored' The script is started 'once per package that installed files' (in case of filetriggerpost) - and gets the file list as input (so it can do something out of it) The rpm scriptlet can have a weight - which could define the order in case more than one file trigger hits (so far I did not see a need for this and the 4 triggers implemented are all the same weight) For the interested ones, the rpm documentation can be a worthy read: http://rpm.org/user_doc/file_triggers.html Cheers, Dominique