Bug 2007270

Summary: Upgrade of java-latest-openjdk changes 'alternatives' java selection
Product: [Fedora] Fedora Reporter: Michael Katzmann <vk2bea>
Component: java-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 34CC: ahughes, jerboaa, jvanek, pmikova, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-21 10:36:10 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:
Embargoed:

Description Michael Katzmann 2021-09-23 12:54:35 UTC
When java-latest-openjdk (java-latest-openjdk-17.0.0.0.35-1.rolling.fc34.x86_64) is installed, the java selection (configuation) as selected by 'alternatives' is changed in some circumstances.
If, before the upgrade, java-latest-openjdk was selected then after the installation of the RPM, the default java is selected.

e.g.  before:
# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
 + 1           java-latest-openjdk.x86_64 (/usr/lib/jvm/java-16-openjdk-16.0.2.0.7-1.rolling.fc34.x86_64/bin/java)
*  2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-4.fc34.x86_64/bin/java)
   3           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-2.fc34.x86_64/jre/bin/java)


and after selection:

# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-2.fc34.x86_64/jre/bin/java)
*+ 2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-4.fc34.x86_64/bin/java)
   3           java-latest-openjdk.x86_64 (/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-1.rolling.fc34.x86_64/bin/java)


The upgrade should preserve the selection of java-latest-openjdk, it does not.

Comment 1 Michael Katzmann 2021-10-03 23:21:32 UTC
Maybe this is related to the 'priority' that is given to java-11 (unbelievably high - 11001207)
/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-4.fc35.x86_64/bin/java - family java-11-openjdk.x86_64 priority 11001207
So it may be a problem with the java-1-openjdk package rather than java-latest-openjdk

Comment 2 Ankur Sinha (FranciscoD) 2021-10-04 07:40:12 UTC
Hi Jiri,

Could you take a quick look at this when you have a minute please? (Updates should not touch user configs, and change in alternatives seems to qualify as a change in user configurations?)

Thanks very much

Comment 3 jiri vanek 2021-11-21 10:36:10 UTC

*** This bug has been marked as a duplicate of bug 2001567 ***

Comment 4 Red Hat Bugzilla 2023-09-15 01:15:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days