I have the following entry in my package .spec file:
Requires: jdk >= 1.7
Even though, jdk-1.6.0_45-fcs.x86_64 is installed my package installs without problems (even without warnings). How to force stopping the installation of my package until required Java version is installed?
Thanks!
Best Answer
Came across this post while attempting to figure this out myself. Ended up with this as a solution.
jdk >= 2000:1.7.0_15
It came about by trying the command "yum list installed | grep jdk" and finding that my current version was 2000:1.6.0_45. That lead me to use 2000:1.7.0_15 which removed 1.6 and installed 1.7 for me.
I searched around for some details on package versioning and found this link, http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html
It looks like it is something called an Epoch. "When RPM can't decipher a package's version number, it's time to pull out the Epoch tag. This tag is used to help RPM determine version number ordering."
"In order to direct RPM to look at the epoch number instead of the version number when doing dependency checking, it's necessary to use a ":" before the version in the Requires tag line."