Why is rpm trigger %triggerpostun not used when installing via yum?

Solution Verified - Updated -

Issue

One of our rpm need to do stuff when kernel is installed/remove ie: (un)link some modules in /lib/modules/<kernelversion>/extra/
To achieve that, we're using some rpm triggers (%triggerin, %triggerun and %triggerpostun)
If the rpm is installed via the rpm command, everything works fine. But if our rpm is in a repository and is installed via yum, the %triggerpostun is not launched.

Using RPM
# rpm -e target
triggerun source 1-1 1 0
triggerpostun source 1-1 1 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Using YUM
# yum remove target
=============================================================================================================================================================================
 Package                                  Arch                                     Version                                  Repository                                   Size
==============================================================================================================================================================================
Removing:
 target                                   noarch                                   2-0                                      installed                                   0.0  

Transaction Summary
==============================================================================================================================================================================
Remove        1 Package

Installed size: 0  
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Erasing    : target-2-0.noarch                                                                                                                                          1/1 
triggerun source 1-1 1 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
MISSING OUTPUT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Removed:
  target.noarch 0:2-0                                                                                                                                                         

Complete!

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content