0

I have a problem using yum to resolve dependencies for my project, which consists of multiple RPMs that we build ourselves. I have built an RPM with:

Requires: Database-devel = 1.0.0

But when I run:

$ yum deplist Release/ConfigLoader-devel-4.0.1-0.191128.123053.g83eb.b.d.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel: epel.besthosting.ua
package: ConfigLoader-devel.x86_64 4.0.1-0.191128.123053.g83eb.b.d.el7
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-31.el7
  dependency: Database-devel = 1.0.0
   provider: Database-devel.x86_64 2.0.0-0.191126.123742.gb769.r

It says that the provider of that dependency (the last line) has version 2.0.0. The following additional information confirms that the versions for the Database-devel package are set up correctly in the yum repo, and that there's a 1.0.0 version available for yum to select:

$ yum info Database-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel: epel.besthosting.ua
Available Packages
Name        : Database-devel
Arch        : x86_64
Version     : 2.0.0
Release     : 0.191126.123742.gb769.r
Size        : 13 k
Repo        : localrepo-oel7


$ yum info Database-devel-1.0.0-1
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel: epel.besthosting.ua
Available Packages
Name        : Database-devel
Arch        : x86_64
Version     : 1.0.0
Release     : 1
Size        : 13 k
Repo        : localrepo-oel7

The issue is that when I try to install the ConfigLoader-devel RPM, it tries to pull down the Database-devel 2.0.0 package and install it, which breaks my build.

My yum version is:

$ yum --version
3.4.3
  Installed: rpm-4.11.3-35.el7.x86_64 at 2019-05-21 13:14
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2018-10-30 19:27
  Committed: Pavlina Moravcova Varekova <[email protected]> at 2018-06-19

  Installed: yum-3.4.3-161.0.1.el7.noarch at 2019-06-05 11:27
  Built    : None at 2018-11-01 10:10
  Committed: EL Errata <[email protected]> at 2018-10-31

  Installed: yum-plugin-fastestmirror-1.1.31-50.el7.noarch at 2019-05-21 13:15
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2018-10-30 22:58
  Committed: Michal Domonkos <[email protected]> at 2018-08-24

How can I diagnose this further?

1 Answer 1

0

Probably your package Database-devel provides Database-devel. You can check this like this:

rpm -q Database-devel --provides

it should say something like this:

Database-devel = 2.0.0-0

if it says also:

Database-devel

without version number, then this means for rpm and thus for yum that it provides all versions of Database-devel, including version 1.0.0.

You should remove the line

Provides: Database-devel

from your spec file. Each package automatically provides its own name and version.

2
  • You were totally correct, the Database-devel package had a Provides: Database-devel in it. I'm not sure how you knew that, but good catch! Thanks very much!
    – Obiphil
    Commented Nov 29, 2019 at 10:43
  • @Obiphil I do a lot of rpm packaging, I've seen quite some things, but thanks :)
    – Chris Maes
    Commented Nov 29, 2019 at 10:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .