Bug 618427

Summary: wrong version selected by yum
Product: Red Hat Enterprise Linux 6 Reporter: Levente Farkas <lfarkas>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: ddumas
Target Milestone: rcKeywords: Reopened, RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-28 17:30:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
src.rpm which do not build none

Description Levente Farkas 2010-07-26 22:08:08 UTC
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.

Comment 2 RHEL Program Management 2010-07-26 22:37:32 UTC
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. **

Comment 3 Levente Farkas 2010-07-27 10:08:10 UTC
imho it's a serious error and should have to be fixed asap.

Comment 4 Levente Farkas 2010-07-27 10:43:12 UTC
*** Bug 618417 has been marked as a duplicate of this bug. ***

Comment 5 seth vidal 2010-07-27 12:54:26 UTC
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?

Comment 6 James Antill 2010-07-27 13:44:02 UTC
Levente, we've documented the process yum uses to pick between multiple providers:

http://yum.baseurl.org/wiki/CompareProviders

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

Comment 7 Levente Farkas 2010-07-27 15:00:48 UTC
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:
http://fedoraproject.org/wiki/Packaging/Java
------------------------------------
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.

Comment 8 seth vidal 2010-07-27 15:09:47 UTC
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.

Comment 9 James Antill 2010-07-27 15:21:01 UTC
> 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.    

 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:

Requires: java

...which would be against the guidelines.

Comment 10 Levente Farkas 2010-07-27 20:45:17 UTC
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:
el6 (1.4):
http://koji.fedoraproject.org/koji/buildinfo?buildID=179409
el6 (1.3):
http://koji.fedoraproject.org/koji/buildinfo?buildID=172981
el5:
http://koji.fedoraproject.org/koji/buildinfo?buildID=179408
fc14:
http://koji.fedoraproject.org/koji/buildinfo?buildID=179407
fc12:
http://koji.fedoraproject.org/koji/buildinfo?buildID=156947
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.

Comment 11 Levente Farkas 2010-07-27 20:48:07 UTC
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:
- rpm
- yum
- mock
imho it's a bug. can you tell me bug of which of the above package?

Comment 12 Levente Farkas 2010-07-27 20:51:26 UTC
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).
thanks

Comment 13 Levente Farkas 2010-07-28 13:53:36 UTC
sorry it seems i try to build on rhel-6 beta1. after i update to rhel-6 beta2 update1 everything is working again.

Comment 14 Denise Dumas 2010-07-28 17:30:32 UTC
Based on the above comment, closing this BZ