Reputation: 158
I'm having a problem where using rpm and yum won't pick up the packages required for an update. I'm performing an upgrade of main-package from 16.1 to 16.2. If I do yum upgrade, I get this:
# yum upgrade
...
======================================================================================================
Package Arch Version Repository Size
======================================================================================================
Updating:
sub-package x86_64 1.1-455015.el7 privaterepo 29 k
main-package noarch 16.2-460032.el7 privaterepo 1.9 M
...
If I run yum upgrade main-package I get this:
# yum upgrade main-package
======================================================================================================
Package Arch Version Repository Size
======================================================================================================
Updating:
main-package noarch 16.2-460032.el7 privaterepo 1.9 M
Transaction Summary
======================================================================================================
It doesn't seem to think I need the new sub-package, even though the RPM suggests it does:
# rpm -q --requires -p main-package-16.2-460032.el7.noarch.rpm | grep -i sub-package
sub-package >= 1.1
# rpm -qa | grep sub-package
sub-package-1.0-455013.el7.x86_64
Based on what I see, when I yum upgrade main-package, it should see that it needs sub-package >= 1.1 and get it as well. I should add that the install works fine. It's as if rpm and yum are completely ignoring the requirement that main-package needs version 1.1 of sub-package.
EDIT:
Here is what rpm shows about dependencies:
# rpm -q --provides -p sub-package-1.1-455015.el7.x86_64.rpm
sub-package
sub-package = 1.1-455015.el7
sub-package(x86-64) = 1.1-455015.el7
# rpm -q --requires -p main-package-16.2-460032.el7.noarch.rpm | grep sub-package
sub-package >= 1.1
Here is the older sub-package that's already installed:
# rpm -q --provides sub-package
sub-package
sub-package = 1.0-455013.el7
sub-package(x86-64) = 1.0-455013.el7
Here is the relevant information in my spec file:
$ grep sub-package main-package.spec
Requires: sub-package >= 1.1
$ head -n4 sub-package.spec
Summary: sub-package (...)
Name: sub-package
Version: 1.1
Release: %{BUILD_NUMBER}%{?dist}
EDIT 2:
I've been doing some more digging, One thing I noticed is that sub-package is listed twice if I rpm -q --whatprovides sub-package where the other dependencies that it picks up fine are only listed once.
Upvotes: 2
Views: 657
Reputation: 158
The anwser, thanks to @alvits, is that I had
Provides: sub-package
in the sub-package spec file. The hint comes from this line:
# rpm -q --provides -p sub-package-1.1-455015.el7.x86_64.rpm
sub-package
sub-package = 1.1-455015.el7
sub-package(x86-64) = 1.1-455015.el7
The first line of output tells rpm that my version of sub-package satisfies all version.
Upvotes: 1