[Rpm-maint] [rpm-software-management/rpm] file trigger quirks (#1370)

Fabian Vogt notifications at github.com
Tue Jan 12 10:33:14 UTC 2021


> The problem with counting owners is that it's a per-file thing, and a file-trigger can match any arbitrary number of them, so the count would have to be per-file and so can't be in the global argument. I should've just dropped both the global arguments while at it...

The documentation says: "File triggers execute once for package". So unlike `%transfiletrigger`, plain `%filetrigger` is called once for each triggering package (including itself, for all matching installed files), so there is a single triggering package for each call. In the case that the triggering package is completely removed (`$1 == 0`), there's a potential issue with files owned by multiple packages, but arguably `%postun` has the same.

In this particular case, only the case that `%filetriggerun` is called for all files when the package containing the trigger is upgraded is an issue, which currently can't be detected.

Though I currently wonder why `%filetriggerun` is not called when a package with matching files is upgraded. That might just be a case of no (clear) documentation, as if it were called, the script couldn't tell and probably undo the work of `%filetriggerin`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1370#issuecomment-758563971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210112/636f5f01/attachment.html>


More information about the Rpm-maint mailing list