Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionAndrew John Hughes
2021-09-27 14:48:08 UTC
This bug was initially created as a copy of Bug #1976053
I am copying this bug because:
Sync with change to OpenJDK 8 RPM.
Description of problem:
If you reinstall one of the following packages it causes the alternatives links to be removed from the system:
java-1.8.0-openjdk-headless
java-1.8.0-openjdk-devel
java-11-openjdk-headless
java-11-openjdk-devel
How reproducible:
Always
Steps to Reproduce:
1. dnf install java-1.8.0-openjdk-headless
2. ls -lh /usr/bin/java
3. dnf reinstall java-1.8.0-openjdk-headless
4. ls -lh /usr/bin/java
Actual results:
[root@rhel8 ~]# dnf install java-1.8.0-openjdk-headless
...
Installed:
copy-jdk-configs-3.7-4.el8.noarch java-1.8.0-openjdk-headless-1:1.8.0.292.b10-1.el8_4.x86_64 javapackages-filesystem-5.3.0-1.module+el8+2447+6f56d9a6.noarch libjpeg-turbo-1.5.3-10.el8.x86_64
lksctp-tools-1.0.18-3.el8.x86_64 lua-5.3.4-11.el8.x86_64 tzdata-java-2021a-1.el8.noarch
Complete!
[root@rhel8 ~]# ls -lh /usr/bin/java
lrwxrwxrwx. 1 root root 22 Jun 25 15:41 /usr/bin/java -> /etc/alternatives/java
[root@rhel8 ~]# dnf reinstall java-1.8.0-openjdk-headless
...
Reinstalled:
java-1.8.0-openjdk-headless-1:1.8.0.292.b10-1.el8_4.x86_64
Complete!
[root@rhel8 ~]# ls -lh /usr/bin/java
ls: cannot access '/usr/bin/java': No such file or directory
Expected results:
The link should still be there after the reinstall.
Additional info:
This bug seems to affect all the openjdk packages that install alternatives links. I have verified it with the packages listed above.
The alternatives --removes commands in the postinstall scriptlets should be wrapped in `if [ "$1" = 0 ]; then ... fi` which will result in the removal only happening on an actual uninstall, and not an update or reinstall.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (java-11-openjdk bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:1799