Red Hat Bugzilla – Bug 618427
wrong version selected by yum
Last modified: 2014-01-21 01:18:30 EST
on rhel-6 beta2 update2 the command
yum install java-devel
wrongly install java-1.5.0-gcj-devel in stead of java-1.6.0-openjdk while both provide java-devel and java-1.6.0-openjdk has higher version and epoch too.
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.
** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
imho it's a serious error and should have to be fixed asap.
*** Bug 618417 has been marked as a duplicate of this bug. ***
for the requirement you wanted to install I don't see any way for yum to decide to choose java-1.6.0-openjdk over java-1.5.0-gcj-devel.
They both offer java-devel for the same archs.
Why is java-1.6.0-openjdk a better resolver for java-devel?
Levente, we've documented the process yum uses to pick between multiple providers:
...we have done (and will likely continue to do) changes, when we think something is likely to choose "better". However just comparing versions between two different packages is not likely to be better, in general.
because java-1.6.0-openjdk has higher version and even higher epoch and until rhel-6 (and in all rhel and fedora) yum behave like this. and eg. because java packaging guideline said:
For historical reasons, when specifying versions 1.6.0 or greater, an epoch of 1 must be included. Example:
Requires: java >= 1:1.6.0
so this is the de-facto standard way for defining newer java version requirement.
do you have new better recommendation? than it'd have to modify in the above guideline too.
you didn't specify a version and when two pkgs w/o the same pkg name are being compared doing a vercomparison is meaningless.
Read the link James posted.
There's nothing to fix here.
> Requires: java >= 1:1.6.0
> so this is the de-facto standard way for defining newer java version
> do you have new better recommendation? than it'd have to modify in the above
> guideline too.
I think you might be confused about what is happening when. The above is correct, and works just as well from the command line as:
yum install 'java-devel >= 1:1.6.0'
...because only a single package provides what you are requesting. When you specify just "yum install java-devel" there are now two packages which provide what you've requested, so (assuming one isn't installed already) we compare them in a number of ways (see the link). This would be like doing:
...which would be against the guidelines.
ok nice explanation and can be good, but the original reason why i wrote it since i'm no longer be able to build gstreamer-java as before. it was build on:
an all contains in the spec:
Requires: java >= 1:1.6.0
BuildRequires: java-devel >= 1:1.6.0
but now with the latest rhel-6 beta2 update1 it's no longer build! i don't know what's change? i already test different version of mock (1.0.8 and 1.1.1) and always produce the same problem.
Created attachment 434843 [details]
src.rpm which do not build
this src.rpm no longer build in mock in rhel-6 beta2 update1.
is it a bug in:
imho it's a bug. can you tell me bug of which of the above package?
could you please modify this bug's product and component to the right product and component (i don't have the right to do so).
sorry it seems i try to build on rhel-6 beta1. after i update to rhel-6 beta2 update1 everything is working again.
Based on the above comment, closing this BZ