Re: Old and new package version numbers during RPM update

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



Anand Buddhdev wrote:

> Hi CentOS folk,
> 
> In an RPM post-install script, is it possible to know the previous
> version number, and the new version number of a package if it's an update?
> 
> I need to know this, because for a certain package, if updating from
> version 1.x to 2.x, I need to run a program to convert the config file
> of the package from version 1.x format to version 2.x format.
> 
> I've looked at SPEC file documentation, but haven't found anything
> relevant.

triggers can support that, you can implement a trigger scriplet to run only 
if upgrading from < 2.x, using something like:

%triggerun foo < 2.x
convert_config...

See also:
http://rpm.org/api/4.4.2.2/triggers.html


-- Rex

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux