RPMbuild force dependency to specific RPM in built RPM

139 Views Asked by At

I'm facing a problem, which requires a dependency to force the install of another RPM in a specific version, when installing My newly built RPM.

Situation: My-Old-Foo.rpm has dependency to: 3rd-Party-7.0.6 RPM (where 7.0.6 ist part of the RPM name, NOT the version) My-New-Foo.rpm has dependency to: 3rd-Party-7.0.7 RPM This dependency has been put into the .spec file & the build process runs smooth so far... BUT when installing the PRM, it checks it's dependencies to lib this.so, that.so, yaddayadda.so und finds its dependencies satisfied in:

  • 3rd-Party-3.14.12-8.9.rpm
  • 3rd-Party-7.0.6-2.7.rpm
  • 3rd-Party-7.0.7-1.0.rpm

3rd-Party-7.0.6 is already installed, so nothig to do.

How do I force the install of 3rd-Party-7.0.7 no mater what and regardless if dependencies to libs are already satisfied, when installing My-New-Foo.rpm?

Already tried: Putting dependencies in .spec file

BuildRequires:  3rd-Party-7.0.7
Requires:       3rd-Party-7.0.7
Requires:       some more stuff

Where my understanding is: "BuildRequires:" well... is requiered for the build. While "Requires:" sets dependencies like a meta package.

Any hint appreciated thx Sil

1

There are 1 best solutions below

0
Aaron D. Marasco On

It sounds like the 3rd party RPMs are a mess; Requires is the proper metadata tag to use here.

Here's something to try:

Requires: 3rd-Party-7.0.7 = 1.0
Conflicts: 3rd-Party-7.0.6

Or you need to give us more information as noted in commentary.