Bug 1252406

Summary: openjdk-headless 1.8.0.51 has a %postun scriptlet error that break java if reinstalled
Product: [Fedora] Fedora Reporter: Heldwin <heldwin>
Component: java-1.8.0-openjdkAssignee: Deepak Bhole <dbhole>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: ahughes, dbhole, jerboaa, jvanek, msrb, omajid
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-12 09:05:27 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:
Bug Depends On: 1260702    
Bug Blocks:    

Description Heldwin 2015-08-11 10:30:42 UTC
Description of problem:
java-1.8.0-openjdk-headless has a %postun scriptlet error that will break java if reinstalled.

Not sure yet if it will do an error updating to the next version. When I remove this package with: rpm -e --nodeps, it tells a %postun scriptlet error, exit 2

The only way I have found is to remove it and install it.


Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64 


How reproducible:
always


Steps to Reproduce:
1. install java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64 
2. which java, or: alternatives --display java -> returns a java
3. dnf reinstall java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64 
4. which java, or: alternatives --display java -> returns nothing

Comment 1 Heldwin 2015-08-11 12:20:05 UTC
D: %postun(java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64): scriptlet start
fdio:       2 writes,      404 total bytes in 0.000025 secs
D: %postun(java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64): execv(/bin/sh) pid 26611
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexeccon: (/bin/sh, unconfined_u:unconfined_r:rpm_script_t:s0-s0:c0.c1023) 
+ alternatives --remove java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-4.b16.fc22.x86_64/jre/bin/java
+ alternatives --remove jre_openjdk /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-4.b16.fc22.x86_64/jre
+ alternatives --remove jre_1.8.0 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-4.b16.fc22.x86_64/jre
+ alternatives --remove jre_1.8.0_openjdk /usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.51-4.b16.fc22.x86_64
D: %postun(java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64): waitpid(26811) rc 26811 status 200
warning: %postun(java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64) scriptlet failed, exit status 2

------------------------------------------------------------------------------

It does the same if I run these alternatives --remove commands after a clean install, and then if I try to remove it. 

Would it be because during the reinstall, the %postun remove them during the remove, but does not add them again for install ?

Comment 2 jiri vanek 2015-08-11 12:28:43 UTC
Maybe....

Currently I dont know what is wrong with dnf. As you cans ee, the behaviour is ok with yum.

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

Comment 3 jiri vanek 2016-07-12 09:05:27 UTC

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