3

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!

1
  • Maybe rpm is confused by the underscore in the version number.
    – WilQu
    Apr 2, 2014 at 14:21

1 Answer 1

4

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."

3
  • Hi Joseph! Can you explain what's this prefix "2000:" about? Thanks! Jul 3, 2014 at 6:59
  • Edited in more detail
    – Joseph
    Jul 3, 2014 at 20:14
  • I'd say it's for "Java 2", as "1.7" is supposedly actually "Java SE 2 version 1.7" Aug 13, 2014 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .