Logical 'or' for package dependencies
Greg_Swift at aotx.uscourts.gov
Greg_Swift at aotx.uscourts.gov
Wed Oct 13 21:30:21 UTC 2010
rpm-list-bounces at lists.rpm.org wrote on 10/13/2010 03:21:39 PM:
> Quick question (I hope). Suppose you are making a package that requires
> Java. Either OpenJDK -or- SUN/Oracle is acceptable. OpenJDK provides
the
> 'openjdk' package, whereas SUN/Oracle provides 'jre' for the basic
> runtime. How would one craft the 'Requires:' line to pass if either (or
> both) is present?
>
> Or do we to provide 2 RPMs, one for each flavor of Java...
I am not aware of a way to do "or", but as long as the packages provide a
shared provides then a end user can manually ensure their preferred package
is installed, leaving you to not care. I'm not sure how an automatic
dependancy resolution would end up.
For this specific the OpenJDK package provides 'jre' just like the
Sun/Oracle package, and apparently the IBM one as well.
So I would just require the item you deem most appropriate, and thus you
just provide one package.
$ rpm -q --provides java-1.6.0-openjdk | egrep '(java|jre)'
config(java-1.6.0-openjdk) = 1:1.6.0.0-1.11.b16.el5
java = 1:1.6.0
java-1.6.0 = 1:1.6.0.0-1.11.b16.el5
java-1.7.0-icedtea = 0:1.7.0.0-0.999
java-fonts = 1:1.6.0.0
java-openjdk = 1:1.6.0.0-1.11.b16.el5
java-sasl = 1:1.6.0.0
jre = 1.6.0
jre-1.6.0 = 1:1.6.0.0-1.11.b16.el5
jre-1.6.0-openjdk = 1:1.6.0.0-1.11.b16.el5
jre-openjdk = 1:1.6.0.0-1.11.b16.el5
libjava.so()(64bit)
libjava.so(SUNWprivate_1.1)(64bit)
libjava_crw_demo.so()(64bit)
libjava_crw_demo.so(SUNWprivate_1.1)(64bit)
java-1.6.0-openjdk = 1:1.6.0.0-1.11.b16.el5
$ rpm -q --provides java-1.6.0-sun | egrep '(java|jre)'
jre-1.6.0-sun = 1:1.6.0.20-1jpp.1.el5
jre-sun = 1:1.6.0.20-1jpp.1.el5
jre-1.6.0 = 1:1.6.0.20-1jpp.1.el5
java-1.6.0 = 1:1.6.0.20-1jpp.1.el5
jre = 1:1.6.0
java-sun = 1:1.6.0.20-1jpp.1.el5
java = 1:1.6.0
javaws = 1:1.6.0
java-sasl = 1:1.6.0.20
libjava_crw_demo.so()(64bit)
libjava_crw_demo.so(SUNWprivate_1.1)(64bit)
libjava.so()(64bit)
libjava.so(SUNWprivate_1.1)(64bit)
java-1.6.0-sun = 1:1.6.0.20-1jpp.1.el5
$ rpm -q --provides java-1.6.0-ibm
jre-1.6.0-ibm = 1:1.6.0.7-1jpp.2.el5
jre-ibm = 1:1.6.0.7-1jpp.2.el5
jre-1.6.0
java-1.6.0
jre = 1:1.6.0
java-ibm = 1:1.6.0.7-1jpp.2.el5
java = 1:1.6.0
javaws = 1.6.0
java-sasl = 1:1.6.0.7
libjava_crw_demo.so()(64bit)
libjava_crw_demo.so(SUNWprivate_1.1)(64bit)
libjava.so()(64bit)
libjava.so(SUNWprivate_1.1)(64bit)
java-1.6.0-ibm = 1:1.6.0.7-1jpp.2.el5
Based on looking at that, I would assume that by using the epoch, Sun would
win in the dependency game regarding jre, and still not sure how the
dependency on java would play out.
-greg
More information about the Rpm-list
mailing list