Issue
I specified a minimum OpenJDK version in an rpm called MyPackage
.
# rpm -qR MyPackage
rpmlib(VersionedDependencies) <= 3.0.3-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
java-1.8.0-openjdk-devel >= 1.8.0.161
I am installing the package on a machine that already has OpenJDK 1.8.0.144-0.b01.el6_9
.
# rpm -q --provides java-1.8.0-openjdk-devel
...
java-1.8.0-openjdk-devel = 1:1.8.0.144-0.b01.el6_9
java-1.8.0-openjdk-devel(x86-64) = 1:1.8.0.144-0.b01.el6_9
yum installs MyPackage
without upgrading OpenJDK to 1.8.0.161-3.b14.el6_9
and this version is available in the yum repository.
What do I need to specify in the RPM dependencies to cause OpenJDK to upgrade?
Solution
The minimum OpenJDK version in the rpm must include the epoch
; otherwise, the epoch
will default to 0. Hence, this is the corrected RPM.
# rpm -qR MyPackage
rpmlib(VersionedDependencies) <= 3.0.3-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
java-1.8.0-openjdk-devel >= 1:1.8.0.161
Answered By - Nathan Answer Checked By - Clifford M. (WPSolving Volunteer)