%postun execution order within transaction

Matt Grimm mgrimm at gci.com
Wed Jul 21 22:46:37 UTC 2010


Hello,

I'm trying to determine exactly when the %postun scripts are executed for a group of packages being removed in a single transaction. Does each package's postun script run immediately after it is uninstalled, or do they all run at once after every package in the transaction has been removed?

To illustrate, say I have a primary package called "program" and another package that depends on it called "program-module". The postun script in "program-module" requires a certain executable from "program", so if both package's files are erased first, then their postun scripts are executed, the postun script for "program-module" will always fail!

I would have expected the order of operations to look like this:

Erase package "program-module"
Run %postun for "program-module"
Erase package "program"
Run %postun for "program"

But it looks like this might be closer to what is happening:

Erase package "program-module"
Erase package "program"
Run %postun for "program-module"
Run %postun for "program"

Thanks for any insight,
m.



More information about the Rpm-list mailing list