Bug 1259241

Summary: Missing directories on 32bit after update (causing javac not to be found on path)
Product: Red Hat Enterprise Linux 6 Reporter: Lukáš Zachar <lzachar>
Component: java-1.8.0-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED NEXTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: jvanek, sbaiduzh
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: i386   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-04 08:07:45 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:    
Bug Blocks: 1254197    

Description Lukáš Zachar 2015-09-02 09:26:24 UTC
Description of problem:

On upgrade 
from java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.i686 
to java-1.8.0-openjdk-1.8.0.51-2.b16.el6_7.i686 

there are few missing directories (rpm -Va java-1.8.0-openjdk\*):
missing     /usr/lib/jvm/jre-1.8.0-openjdk
missing     /usr/lib/jvm-exports/java-1.8.0-openjdk
missing     /usr/lib/jvm/java-1.8.0-openjdk

What makes is troublesome is the fact, that javac target link (in alternatives) is 
/usr/lib/jvm/java-1.8.0-openjdk/bin/javac and as 
/usr/lib/jvm/java-1.8.0-openjdk does not exist it causes 
-bash: /usr/bin/javac: No such file or directory


Steps to Reproduce:
1. install java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7
2. update to new version
3. rpm -Va java-1.8.0-openjdk\*

Actual results:
missing directories

Expected results:
all set

Additional info:
This is problem only on 32bit

Comment 1 Lukáš Zachar 2015-09-02 09:42:55 UTC
Same goes for /usr/lib/jvm/jre-1.8.0-openjdk and java target

Comment 2 jiri vanek 2015-09-02 11:37:58 UTC
Well, crap.

Part of the fix of  1254197 was :
 * changing some alternatives-controlled links to hardcoded links
 * inistead of %{_arch} in names use ifarch %32b ... someName... %else ..someName_x86_64.. %endif

The second is causing why you are seeing  it on 32b system only. The links in  rhel7-like naming are arch-less

The first is.. well crap.
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scriptlet_Ordering

original udpated package created links based on alternatives (created  in pre and removed in post)
new updating package will replace those links by hardcoded values (in install)
And pre of uninstalled package is happening after innstall. 
So removal of original package removes the hardcoded links in post.

Only slution in my mind is to recreate them in posttrans :(

Comment 4 jiri vanek 2015-09-04 05:53:58 UTC
One more idea. The origianl issue (1217177) was reported agains 64b java only.

So nobody cares about 32b? If so, then instead of ifarch ... else.... I would really go with name{arch}.
This will keep 1217177 fixed, will cause little bit inconsistent name on 32, but will remove need of posttrans.

Comment 6 jiri vanek 2015-09-09 08:59:20 UTC
fixed like c#4