Bug 618427 - wrong version selected by yum
wrong version selected by yum
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: James Antill
BaseOS QE Security Team
: Reopened, RHELNAK
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-26 18:08 EDT by Levente Farkas
Modified: 2014-01-21 01:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-28 13:30:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
src.rpm which do not build (3.84 MB, application/x-rpm)
2010-07-27 16:48 EDT, Levente Farkas
no flags Details

  None (edit)
Description Levente Farkas 2010-07-26 18:08:08 EDT
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 Product and Program Management 2010-07-26 18:37:32 EDT
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 06:08:10 EDT
imho it's a serious error and should have to be fixed asap.
Comment 4 Levente Farkas 2010-07-27 06:43:12 EDT
*** Bug 618417 has been marked as a duplicate of this bug. ***
Comment 5 seth vidal 2010-07-27 08:54:26 EDT
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 09:44:02 EDT
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 11:00:48 EDT
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 11:09:47 EDT
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 11:21:01 EDT
> 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 16:45:17 EDT
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 16:48:07 EDT
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 16:51:26 EDT
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 09:53:36 EDT
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 13:30:32 EDT
Based on the above comment, closing this BZ

Note You need to log in before you can comment on or make changes to this bug.