I am revising one of our in-house RPMs that adds to the nagios package.
Originally our package would alter some files that were installed by nagios.
My new package undoes this methodology and takes an additive approach.
Is it possible to do something like this in the %pre section?
%pre
rpm --erase nagios
rpm --install nagios
When I run this it hangs here:
warning: waiting for transaction lock on /var/lib/rpm/__db.000
No way that I am aware of. If you need to do something special when nagios
is modified, you can use %triggerin
and %triggerout
. I believe %triggerin
will be executed when you install your RPM if nagios
is already installed, but I don't remember offhand where in the sequence it will happen.