Bug 1324714

Summary: Run alternatives --config java breaks symlink to javaws
Product: [Fedora] Fedora Reporter: Luiz Poleto <luiz.poleto>
Component: galternativesAssignee: Jaromír Cápík <jaromir.capik>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dakingun, jaromir.capik
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: 2017-08-08 14:11:03 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 Luiz Poleto 2016-04-07 05:31:04 UTC
Description of problem:
I am running Fedora 24-alpha. I installed Oracle HotSpot JVM 1.8 u77 and used alternatives to set the defaults. I ran the following commands:

alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000

Checked the symlinks at /usr/bin and /etc/alternatives and  all looked fine. 

Problem started after running:

alternatives --config java

to select my default Java. I was able to select the Oracle JVM. After doing that, running alternatives --list generated an incomplete list with the error:

failed to read link /usr/bin/javaws: No such file or directory

Checking /usr/bin and /etc/alternatives, javaws is not there anymore. However, javaws stil exists at /var/lib/alternatives

Running with versions:
alternatives version 1.7 - Copyright (C) 2001 Red Hat, Inc.
Linux localhost 4.5.0-302.fc24.x86_64 #1 SMP Wed Mar 30 15:41:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Jva JDK Oracle: 1.8u77

How reproducible:
Every time.

Steps to Reproduce (Oracle Java JDK 1.8u77is installed):
1. Make sure that alternatives was run to install java, javac and javaws and the symlinks were created.

2. Run alternatives --config java and select the Oracle JVM
3. Run alternatives --list

Actual results:
After running alternatives --list, instead of a complete list, the following error message will show and the symlinks to javaws are deleted from /usr/bin and /etc/alternatives

failed to read link /usr/bin/javaws: No such file or directory


Expected results:
Symlinks to javaws is not removed.

Comment 1 Fedora End Of Life 2017-07-25 20:29:44 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-08-08 14:11:03 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.