Bug 130499

Summary: libgcj update rpm wipes out java and javac
Product: Red Hat Enterprise Linux 3 Reporter: Alan Westhagen <afw>
Component: libgcjAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: fitzsim, shillman
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-21 21:02:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Westhagen 2004-08-20 20:05:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20040803

Description of problem:
Can't do java development or run ordinary java programs.

The damage was done by up2date.  I have not been able to find any
work-around described.

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


How reproducible:
Always

Steps to Reproduce:
1.javac x.java
2.
3.
    

Actual Results:  A place holder scrit runs instead of the compiler or
the run-time.  The place holder outputs a cryptic messages to stdout.

Expected Results:  javac should run
java should run

Additional info:

Comment 1 Suzanne Hillman 2004-09-10 20:17:44 UTC
Which version of java and javac were installed? What rpms were they
part of? And do they rpms still believe they are installed?

Comment 2 Alan Westhagen 2004-09-10 22:21:41 UTC
java and javac are part of the rpm j2sdk-1.4.2_03-fcs

Yes they are installed.  By hand I have fixed up the soft links from
/usr/bin/java[c] to 
/etc/alternatives/java[c] to 
/usr/java/j2sdk1.4.2_03/bin/java[c]

I had to spend at least an hour researching how to do this but,
a worse problem is that necessary functions were broken for some
time before this was discovered.

I believe that installing an unrelated rpm should not cause this
kind of grief.  If it is going to make such a change, the least it
could do is give a detailed message describing the links that have
to be set up rather than the cryptic message that is now produced.

Better yet, when an rpm breaks existing links in order to implement
alternatives, the installer should include logic to determine which
alternative is currently being used.  Instead an alternative was
set up that few on earth choose to use.  This is all too reminiscent
of the way things are done in MS land.

Comment 3 Thomas Fitzsimmons 2004-09-13 22:32:10 UTC
It should be sufficient to have /usr/java/j2sdk1.4.2_03/bin appear in
PATH before /usr/bin (rather than altering the symlinks by hand). 
This change was designed to work with supported RHEL3 JVM packages. 
It causes problems however, if a non-RHEL3 JVM's bin directory appears
after /usr/bin in the PATH.  The new libgcj rpm (for the reasons
described in the placeholder script) installs java and javac
alternatives symlinks in /usr/bin, so it overrides any java commands
that appear after /usr/bin in PATH.

I'll append a message to this effect to the output of the placeholder
script in the next release of libgcj.


Comment 4 Thomas Fitzsimmons 2004-10-25 22:38:46 UTC
I'm appending this message to the placeholder script's output:

This script was designed to be overridden by the supported RHEL3 JRE
packages, java-1.4.2-bea and java-1.4.2-ibm.  It is installed as an
alternative symlink as /usr/bin/java.  It will override a third-party
(non-RHEL3) JRE's java command if the JRE's bin directory is listed
after /usr/bin in PATH.  In that case, it is recommended that the
third-party JRE's bin directory be listed first in PATH instead.

Comment 5 Thomas Fitzsimmons 2004-10-25 22:41:56 UTC
That last comment applied to libgcj-java-placeholder.sh.

To libgcj-javac-placeholder.sh I'll add:

This script was designed to be overridden by the supported RHEL3 SDK
packages, java-1.4.2-bea-devel and java-1.4.2-ibm-devel.  It is
installed as an alternative symlink as /usr/bin/javac.  It will
override a third-party (non-RHEL3) SDK's javac command if the SDK's
bin directory is listed after /usr/bin in PATH.  In that case, it is
recommended that the third-party SDK's bin directory be listed first
in PATH instead.


Comment 6 Jakub Jelinek 2004-10-26 17:43:49 UTC
New text in libgcj-3.2.3-47.

Comment 7 John Flanagan 2004-12-21 21:02:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-584.html