I'm creating an RPM package (let's call it package A). I need to react if another package (package B) is reinstalled or updated. So I created a trigger inside package B specfile:
%triggerin -- B #myscript
Unfortunately trigger is activated even when I install or update package A and package B is already in the system. I need to execute trigger code only if package A is installed and package B is reinstalled or updated. How can I differentiate between these two types of activation?