0

I have a situation where my-software requires my-common via:

Requires: my-common >= 1.2.0

During yum update my-software, my-common is not upgraded, and is left at version 0.0.1.

Why is yum not updating my-common -- and the install of my-software completes without error, even though the dependency for my-common is not resolved?


See:

# yum deplist my-software
package: my-software.noarch 1.1.0-1637255366
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-34.el7
  dependency: my-common >= 1.2.0
   provider: my-common.x86_64 1.2.0-1637243847.el7_9
   provider: my-common.noarch 0.0.1-20180703160841.el7

Note that yum thinks that my-common is resolved by either of:

  • my-common.x86_64 1.2.0-1637243847.el7_9
  • my-common.noarch 0.0.1-20180703160841.el7

The latter is already installed. Running yum update my-common correctly updates to the 1.2.0 version, and then my-software works correctly.

Noting that the timestamp in the latter package is incorrectly formatted and appears "newer" than the first. But the first has the version I'm requiring, so I would have expected the latter to be completely excluded from the list of valid packages.

Josh M.
  • 679
  • 1
  • 10
  • 21

1 Answers1

1

Maybe it is because the inproper Provides in spec file of my-common.

I encountered the similar problem, and finally I found that, the Provides in spec was misconfigured.

For example,

# without version
Provides: my-common

After this line was removed, newer version could be normally updated by yum install.

Gnuth
  • 126
  • 3
  • You removed the entire `Provides: ...` line? – Josh M. Jun 14 '22 at 21:22
  • Yes, let the RPM build tools set the default value. If default value was not expected, you should care about the version value in `Provides`. For example, `Provides: my-common = 0.0.1`. – Gnuth Jun 15 '22 at 02:24