LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Get package name of trigger caller package in SPEC file with %triggerin (https://www.linuxquestions.org/questions/programming-9/get-package-name-of-trigger-caller-package-in-spec-file-with-triggerin-4175721721/)

bonsei 02-05-2023 03:52 PM

Get package name of trigger caller package in SPEC file with %triggerin
 
I try to build a spec file on rhel8 with some postinstall things after installing or updating some vendor packages.

I'd like to use one trigger to do some common stuff. But need to find out which package called the trigger. %name is the name of my package, but is there a variable which shows the trigger caller package (vendor package)?


In SPEC file:

Name: php-post
...
%triggerin -- php php-common php-fpm httpd
echo "trigger from %name - triggerd by package: ...."


Output during install of my package or any install/update of triggerd package from vendor, e.g.:
trigger from php-post - triggerd by package: php

astrogeek 02-13-2023 11:35 AM

As you have received no replies after several days in Programming forum, perhaps you would receive better exposure in another forum such as Software or in your distros forum. If you would like to move this post to one of those or another please use the Report button to request it.

My own RPM knowledge is too stale to be of any help. Good luck!


All times are GMT -5. The time now is 09:59 PM.