rpm %post - check for version being upgraded

Jos Vos jos at xos.nl
Fri Dec 19 21:15:34 UTC 2008


On Fri, Dec 19, 2008 at 06:42:34PM -0200, Martin Langhoff wrote:

>    How do I query in %post, when executed during an upgrade,
>    for the version we are upgrading from?

You can't.

But I think you can do what you want via a trigger script like this:

   %triggerpostun -- yourpkg < 0.5
   # do what you want

-- 
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204




More information about the fedora-devel-list mailing list