Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to figure out how to make a package of mine depend on anything that provides "java", but I'm not sure what to even look up. Apparently "yum provides" is a command for finding out which package contains a particular file, and "yum info" doesn't seem to have the information I want.

Basically, my OS has a package called "java-1.6.0-openjdk", and my package requires some implementaiton of Java, but it would work perfectly fine on Oracle Java, or Java 7, so I won't want to be that specific about it. Is there a way to just depend on anything that provides Java?

share|improve this question
add comment

1 Answer

i think you need to find a name pattern that fits all these packages, for instance, if you need jdk:

yum list installed '*openjdk*'

maybe you just have to find a or b or c, etc. if the package names cannot be summarized with a unique pattern and avoid faluse positives.

I see, then you can make meta (dummy) packages of your own, each of which then requires one of the suitable packages and provides something like "java-installed".

Then your rpm only need to require java-installed and be done.

share|improve this answer
    
I'm able to install a version of Java, my problem is that I don't want my package to depend on a particular version. Basically in the RPM spec file, I have a line that's currently Requires: java-1.6.0-openjdk, but I'd like it to be something like Requires: java where it automatically determines that java-1.6.0-openjdk provides "java". –  Brendan Long May 11 '12 at 17:17
    
OK, now I understand. What you need is meta (dummy) packages that will bridge that, as in rpm dependencies you cannot directly specify OR relationship, only AND. –  johnshen64 May 11 '12 at 17:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.