[CentOS] rpm -U query

Fri Apr 23 09:16:01 UTC 2010
James Hogarth <james.hogarth at gmail.com>

On 22 April 2010 22:18, Steve Thompson <smt at vgersoft.com> wrote:
> 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
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Err misread the question a bit there... The new binary will be there....

You can always copy the old binary in %pre to /tmp something to have
in %preun and then remove it afterwards...

%pre is before files get replaced...

James