RE: multiple %post script actions

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

 




-----Original Message-----
From: rpm-list-admin@xxxxxxxxxx [mailto:rpm-list-admin@xxxxxxxxxx] On
Behalf Of Jeff Johnson
Sent: Wednesday, December 03, 2003 12:12 PM
To: rpm-list@xxxxxxxxxx
Subject: Re: multiple %post script actions

	Thanks; the rpm -q makes the most sense to me. It would need to
be in the %pre script though, right? Wouldn't the version have changed
by the time %post is run?

	Additionally, I need to support this under RPM 4.0.0 too, so I
may need to go with the individual file checking route.

-Aaron

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


_______________________________________________
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