Re: multiple %post script actions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aaron Hanson wrote:

Hi All-

   Is there an easy way in a package %post script to identify the
previous package version? I need to take some actions conditional on
what the version was BEFORE the upgrade. Seems like a pretty typical
situation...



Sure, write script that tests for previous package, use md5sum on some file if all else fails. That's the most portable solution.

There are triggers that can be added to fire on various versions. Trickier, but doable.

And, with concurrent access in rpm-4.1 and later, you can run a query in %post. Note
carefully that this won't work with versions of rpm that do not support concurrent access,
so add (at least)
Requires: rpm >= 4.1
to your pkg if you attempt rpm -q in %post.


73 de Jeff



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux