[Rpm-maint] RPM <Obsoletes> tag not working

Florian Festi ffesti at redhat.com
Wed Oct 16 06:55:11 UTC 2013

On 10/15/2013 01:13 PM, prashant tyagi wrote:
> Hi Panu,
> Thanks for quick reply.
> It worked with 'rpm -U'. I have got another problem in <Provides:> tag.
> Hi All,
> Here is the complete scenario:
> I have two packages pkgA 10.10.100, pkgB 10.10.100 and I want to merge
> these into pkgC 20.00.000.
> The thing I want to achieve If I install pkgC, it should remove pkgA
> and pkgB. and if I try to install pkgA or pkgB higher version, it
> should tell me "already higher version is installed'.
> what I did to achieve this-
> I used <Obsoletes> and <Provides> tags in spec file for pkgC like this :
> Obsoletes: pkgA <= 10.10.100-1, pkgB <= 10.10.100
> Provides: pkgA <=20.00.000-1, pkgB <20.00.000-1
> when I use- rpm -U pkgC, it remove pkgA and pkgB (<Obsoletes>
> working), but I install pkgA higher version (10.20.200),it got
> installed ( <Provides> not working ).
> Is there any other way to achieve this?

In general the way of solving this is not issuing a higher version of
pkgA and pkgB. In cases you do not control those packages you can add a
Conflict: pkgA and Conflict: pkgB to pkgC which issues an error if those
packages are being installed while pkgC is on the system. Adding such
Conflict:s without a version number is a bit fishy but this is needed
here to rule out all future versions that might come out during pkgC's
life time.


More information about the Rpm-maint mailing list