[CentOS] Old and new package version numbers during RPM update

Sun Jun 28 21:26:42 UTC 2015
Anand Buddhdev <anandb at ripe.net>

On 28/06/15 17:50, John R Pierce wrote:

> On 6/27/2015 5:38 PM, Anand Buddhdev wrote:
>> Thanks Joseph. I am aware of this option, but it would be only a last
>> resort, because checking the format of the config file is error-prone.
> why doesn't the config file have the version in it ?   not having that
> makes your whole system error prone.

Perhaps I wasn't clear. Version 1 of the package uses a config file that
looks like this:

system {
  setting1 value1;
  setting2 value2;

interfaces {

Version 2 of the package has switched to a YAML-based syntax, so the
config file needs to look like this:

  setting1: value1
  setting2: value2

So, I need to be able to program the RPM so that when upgrading from 1.x
to 2.x, it triggers the conversion utility that converts from v1 to v2