Bug 2007270 - Upgrade of java-latest-openjdk changes 'alternatives' java selection
Summary: Upgrade of java-latest-openjdk changes 'alternatives' java selection
Keywords:
Status: CLOSED DUPLICATE of bug 2001567
Alias: None
Product: Fedora
Classification: Fedora
Component: java-openjdk
Version: 34
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-23 12:54 UTC by Michael Katzmann
Modified: 2023-09-15 01:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-21 10:36:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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