forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the number of instances of the source (i.e. triggered) package left after the operation as the first argument ($1) to file trigger scripts, similarly to regular triggers. The %filetrigger{in,un,postun} variants execute at the same time as their regular trigger counterparts so use the same logic to compute the argument. The %transfiletrigger{in,un} variants don't have any regular trigger counterparts but are close relatives of the %posttrans and %preuntrans scriptlets, respectively, so borrow the logic from those. Don't count packages in runImmedFileTriggers() again, though, and just reuse the psm->scriptArg value which is already computed in rpmpsmNew() and used for the normal scriptlets such as %pre. We could/should probably do this in runImmedTriggers(), too, but leave that for later (see issue rpm-software-management#2868). Some tests already cover the file trigger arguments so adjust those, and extend the "basic file triggers 2" test with the remaining scenarios to bring it on par with the regular trigger tests. This is easier than extending "basic file trigger scripts" since we don't really need to test the filenames returned on stdin here, just the arguments. Also add a short note about the argument to the file trigger docs. Argument no. 2 (triggering package count) will be added in a separate commit. Related: rpm-software-management#2755
- Loading branch information
Showing
5 changed files
with
115 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters