Re: EVR comparison and how to sort them?

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

 



On Tue, Dec 23, 2008 at 06:44:00PM +0100, Farkas Levente wrote:

> > Add to your newest package:
> > 
> > %triggerpostun -- %{name} = 1.2.3
> > # run script (or include it here it it is small) upgrade-1.2.3-%{version}
> > 
> > %triggerpostun -- %{name} = 1.2.4
> > # run script (or include it here it it is small) upgrade-1.2.4-%{version}
> 
> in this case i'd have to write all update path combination (which i'd
> not like to do:-) ie. upgrade-1.2.3-1.2.4 and upgrade-1.2.3-1.2.5 too:-(
> ans since i now (at least hope) there is always only one version of each
> packages in my case there no reason for triggerXYZ scripts over XYZ. or
> do i misunderstood something?

I think so, but maybe I did not complete understand what you wanted to
achieve too...

I assumed that you want to install one new version of the package,
say 1.5.0, and that in that package you wanted to arrange that for
each different old version X a different script will be executed for
handling the upgrade from version X to 1.5.0.

You can do this for example in this way, if your migrate scripts are
written "per phase":

%triggerpostun -- %{name} = 1.2.3
/usr/share/yourpkg/scripts/migrate-1.2.3-1.2.4
/usr/share/yourpkg/scripts/migrate-1.2.4-1.2.5
/usr/share/yourpkg/scripts/migrate-1.2.5-1.5.0

%triggerpostun -- %{name} = 1.2.4
/usr/share/yourpkg/scripts/migrate-1.2.4-1.2.5
/usr/share/yourpkg/scripts/migrate-1.2.5-1.5.0

%triggerpostun -- %{name} = 1.2.5
/usr/share/yourpkg/scripts/migrate-1.2.5-1.5.0

Does this help?

-- 
--    Jos Vos <jos@xxxxxx>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/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