Bug 1013379

Summary: update of openjdk overides alternaives
Product: [Fedora] Fedora Reporter: Matthias Summer <matthias>
Component: java-1.7.0-openjdkAssignee: Deepak Bhole <dbhole>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: ahughes, dbhole, jerboaa, jvanek, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 12:43:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matthias Summer 2013-09-29 19:24:41 UTC
Description of problem:

When updateing the openjdk, the java-configuration via alternatives will be overwritten.

Version-Release number of selected component (if applicable):
java-1.7.0-openjdk.x86_64

How reproducible:
Every time installing/updateing/reinstalling openjdk

Steps to Reproduce:
1. Configure alternatives to use an oracle or ibm jdk as default java
2. yum reinstall java-1.7.0-openjdk.x86_64
3. Check your actual java-version

Actual results:

openjdk is the default java.


Expected results:

An update of an unneeded java-version should not touch the alternatives config.


Additional info:

[root@gondor opt]# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /opt/java16/bin/java
*+ 2           /opt/java17/bin/java
   3           /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.5.fc19.x86_64/jre/bin/java

[root@gondor opt]# java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

yum reinstall java-1.7.0-openjdk
......
Installed: java-1.7.0-openjdk.x86_64 1.7.0.60-2.4.2.5.fc19                                 

[root@gondor opt]# java -version
java version "1.7.0_40"
OpenJDK Runtime Environment (fedora-2.4.2.5.fc19-x86_64 u40-b60)
OpenJDK 64-Bit Server VM (build 24.0-b56, mixed mode)


[root@gondor opt]# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /opt/java16/bin/java
*  2           /opt/java17/bin/java
 + 3           /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.5.fc19.x86_64/jre/bin/java

Enter to keep the current selection[+], or type selection number: 2

Comment 1 Matthias Summer 2013-09-29 19:26:04 UTC
alternatives --display java | grep -v slave
java - status is manual.
 link currently points to /opt/java17/bin/java
/opt/java16/bin/java - priority 5
/opt/java17/bin/java - priority 200040
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.5.fc19.x86_64/jre/bin/java - priority 170040
Current `best' version is /opt/java17/bin/java.

Comment 2 jiri vanek 2013-09-30 12:43:27 UTC
Yes, I'm sorry but this is intentionall.
I added the force-symlinks because of update f18-f19 (which were resulting to no symlinks at all.

You can check:
http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/tree/java-1.7.0-openjdk.spec?h=f20#n13
versus
http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/tree/java-1.7.0-openjdk.spec?h=f19#n12

I wonteed to avid this forcing at all, but now the decission is to make advanced users like you  unhappy, or have java broken after f18->f19 broken.

So solution for you can be enable f20repo and whitelist java from here.

I'm afraid I can not remove this forcing until f18 eol.