Paul
Paul

Reputation: 4530

Yum installs wrong version of package with range requirement

I have a semi-complicated setup with multiple repositories that have the same package in it (with a separate team managing the actual repositories).

During our install we are attempting to install a version that satisfies some range by doing: yum install "my-package < 3.0.0"

That was working fine until last week, installing the largest version that was < 3.0.0 (which was 2.5). However, suddenly it started installing version 2.1.0. Is there a way to check why it started that?

When I do yum --showduplicates list my-package it gets the following, so it seems like it should be available:

Installed Packages
my-package.x86_64             2.1.0-1      @codex-released    
Available Packages
my-package.x86_64             0.12.0-1     codex-released     
my-package.x86_64             1.0.0-1      codex-released     
my-package.x86_64             2.1.0-1      codex-released     
my-package.x86_64             2.2.0-1      codex-released     
my-package.x86_64             2.3.0-1      codex-released     
my-package.x86_64             2.4.0-1      codex-testing      
my-package.x86_64             2.4.1-1      codex-released     
my-package.x86_64             2.4.2-1      codex-testing      
my-package.x86_64             2.5.0-1      codex-testing      
my-package.x86_64             2.5.1-1      artifactory-testing
my-package.x86_64             3.0.0-1      artifactory-testing
my-package.x86_64             3.0.0-1      codex-testing   

Is there any way to find out why it's not installing that higher version?

Upvotes: 1

Views: 1190

Answers (1)

msuchy
msuchy

Reputation: 5427

I guess that it is because of Epoch. Some tools does not display it at all. Compare:

$ rpm -q nmap
nmap-7.60-7.fc27.x86_64

And you can see it only if you ask for more details:

$ rpm -q --qf "%{epoch}:%{version} %{name}\n"  nmap
2:7.60 nmap
$ rpm -qi nmap |grep Epoch
Epoch       : 2

But the epoch override the version. See:

$ rpmdev-vercmp 3.0.0 1:2.1.0
3.0.0 < 1:2.1.0

Upvotes: 3

Related Questions