[CentOS] rpm -U query

Thu Apr 22 21:18:42 UTC 2010
Steve Thompson <smt at vgersoft.com>

CentOS, RHEL, all versions.

Suppose I am upgrading a package foo-1.0 to foo-2.0 (assume foo is not 
relocatable), and both packages have %preun sections in their .spec files. 
It appears that foo-1.0's %preun is run after foo-2.0 has been installed. 
So what happens if foo-1.0 needs to run a binary that was provided as part 
of foo-1.0 during its %preun stage, and a binary of the same name is 
provided with foo-2.0? The installed binary is now foo-2.0's, right? So 
how to run foo-1.0's binaries during its %preun stage? Is the old binary 
available under a different name before it gets erased?

-steve