[Rpm-maint] [rpm-software-management/rpm] Pass arg3 to regular and file trigger scripts (PR #3018)

Michal Domonkos notifications at github.com
Tue Apr 23 08:32:05 UTC 2024


@dmnks commented on this pull request.



> @@ -32,7 +32,7 @@ directories, symlinks etc.
 
 The file triggers are defined in spec files of packages. E.g. file trigger executing `ldconfig` could be defined in glibc package.
 
-Similarly to regular triggers, file trigger scripts (except the `%transfiletrigger*` variants) are passed the number of instances of the triggered and triggering package (as the `$1` and `$2` arguments, respectively) that will remain when the file trigger has completed.  This can be useful in order to perform a certain operation when either of the packages is updated or removed.
+Similarly to regular triggers, file trigger scripts are passed the number of instances of the triggered and triggering package (as the `$1` and `$2` arguments, respectively) that will remain when the file trigger has completed, as well as which of those two packages has activated the trigger (the `$3` argument).  As an exception, the `%transfiletrigger*` variants are always passed the value of -1 as the `$2` argument.

Yep... I just didn't feel like copy&pasting the same text from the trigger page but $1 and $2 are described here, and so should $3, so ack, will fix.

FWIW, this will be refactored anyway as part of the (planned) consolidation of the two trigger flavours into one page.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3018#discussion_r1575863971
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3018/review/2016601251 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240423/d78ffcbe/attachment.html>


More information about the Rpm-maint mailing list