Bug 1815733 - java-latest-openjdk-devel-1:14.0.0.36-1 fails to apply the new version of javac to alternatives
Summary: java-latest-openjdk-devel-1:14.0.0.36-1 fails to apply the new version of jav...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-latest-openjdk
Version: 32
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petra Alice Mikova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-21 08:16 UTC by Lars S. Jensen
Modified: 2020-05-18 08:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-18 08:25:01 UTC
Type: Bug


Attachments (Terms of Use)

Description Lars S. Jensen 2020-03-21 08:16:39 UTC
Description of problem:
Upgrading from java-latest-openjdk-devel-1:13.0.2.8-1.rolling.fc31.x86_64 
to java-latest-openjdk-devel-1:14.0.0.36-1.rolling.fc31.x86_64 
fails to set/update alternatives javac to java-latest-openjdk.x86_64.

java and javadocdir are OK in alternatives --config.

The alternatives is missing javac for java-latest-openjdk.x86_64
and the rpm installation script dump an error message:
---------------------
  Upgrading        : java-latest-openjdk-devel-1:14.0.0.36-1.rolling.fc31.x86_64      15/34 
  Running scriptlet: java-latest-openjdk-devel-1:14.0.0.36-1.rolling.fc31.x86_64      15/34 
alternatives version 1.11 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: alternatives --install <link> <name> <path> <priority>
                    [--initscript <service>]
                    [--family <family>]
                    [--slave <slave_link> <slave_name> <slave_path>]*
       alternatives --remove <name> <path>
       alternatives --auto <name>
       alternatives --config <name>
       alternatives --display <name>
       alternatives --set <name> <path>
       alternatives --list
       alternatives --remove-all <name>
       alternatives --add-slave <name> <path> <slave_link> <slave_name> <slave_path>
       alternatives --remove-slave <name> <path> <slave_name>

common options: --verbose --test --help --usage --version --keep-missing
                --altdir <directory> --admindir <directory>
/var/tmp/rpm-tmp.oVep3y: line 64: --slave: command not found

  Upgrading        : pulseaudio-module-bluetooth-13.99.1-2.fc31.x86_64                16/34 
--------------------------------

And it is missing from 'alternatives' cmd:
alternatives --config javac

There are 2 programs which provide 'javac'.

  Selection    Command
-----------------------------------------------
   1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-0.fc31.x86_64/bin/javac)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.fc31.x86_64/bin/javac)

Enter to keep the current selection[+], ...


Version-Release number of selected component (if applicable):

java-latest-openjdk-devel-1:14.0.0.36-1.rolling.fc31.x86_64


Steps to Reproduce:
1. dnf reinstall java-latest-openjdk-devel

Actual results:
unable to select java-latest-openjdk.x86_64 as javac with alternatives --config 

Expected results:
Able to select java-latest-openjdk.x86_64 as javac with alternatives --config 
and the upgrade had selected the new version for javac.

Comment 1 Lars S. Jensen 2020-03-21 09:05:13 UTC
The issue is also on Fedora 32.

Comment 2 Petra Alice Mikova 2020-03-22 17:58:37 UTC
Hi,

there is indeed an error in the postinstall script of the devel package. I will fix it and create another update.

Thank you!

Comment 3 Lars S. Jensen 2020-03-25 16:32:45 UTC
Upgrading from java-latest-openjdk-devel-1:13.0.2.8-1.rolling.fc31.x86_64 to java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64 works:-)

 alternatives --config javac
There are 3 programs which provide 'javac'.
  Selection    Command
-----------------------------------------------
   1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-0.fc31.x86_64/bin/javac)
*  2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.fc31.x86_64/bin/javac)
 + 3           java-latest-openjdk.x86_64 (/usr/lib/jvm/java-14-openjdk-14.0.0.36-2.rolling.fc31.x86_64/bin/javac)

And javac --version
javac 14

But reinstall java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64 fails:
Running transaction
  Preparing        :                                                                    1/1 
  Reinstalling     : java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        1/2 
  Running scriptlet: java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        1/2 
  Cleanup          : java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        2/2 
  Running scriptlet: java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        2/2 
  Verifying        : java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        1/2 
  Verifying        : java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64        2/2 

Reinstalled:
  java-latest-openjdk-devel-1:14.0.0.36-2.rolling.fc31.x86_64                               

$ alternatives --config javac
There are 2 programs which provide 'javac'.
  Selection    Command
-----------------------------------------------
   1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-0.fc31.x86_64/bin/javac)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.fc31.x86_64/bin/javac)

Workaround is to run 'dnf downgrade java-latest-openjdk-devel' and the 'dnf upgrade'.

Comment 4 Fedora Update System 2020-03-25 17:00:26 UTC
FEDORA-2020-43c6420def has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-43c6420def

Comment 5 jiri vanek 2020-03-25 17:03:30 UTC
Hi!

The reinstall is old issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1200302

Unluckily the fix is not worthy of its maintenance.  If you run the reinstallsecond times, it should fix itself.

Sorry for inconvinence.  In this case the issue was in addition doubled by broken scripelt in  :14.0.0.36-1, which is fixed in :14.0.0.36-2

Comment 6 Fedora Update System 2020-03-25 21:07:20 UTC
FEDORA-2020-43c6420def has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-43c6420def`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-43c6420def

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Lars S. Jensen 2020-03-30 15:08:12 UTC
It also works on Fedora 32.
So the bug can be closed:-)


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