Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36046 - java-config --set-user-vm does not work for tcsh users
Summary: java-config --set-user-vm does not work for tcsh users
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Jason A. Mobarak (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion, InVCS
Depends on:
Blocks: 31468
  Show dependency tree
 
Reported: 2003-12-18 02:12 UTC by Jakob Schiotz
Modified: 2004-01-09 14:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against jc_options.py in /usr/lib/python2.2/site-packages/java_config/ (tcsh-support-for-set-user-vm.patch,2.51 KB, patch)
2003-12-28 07:48 UTC, Boris Guskee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Schiotz 2003-12-18 02:12:22 UTC
java-config --set-user-vm=sun-jdk-1.4.2.02 writes environment variables to $HOME/.gentoo/java, but this file is not read by tcsh.  I cannot just include it in my .tcshrc, as it is in bash format, and env-update cannot be run by a non-root user (and I doubt it would fix the problem anyway).  Is there a need for a non-root-mode of env-update?


Reproducible: Always
Steps to Reproduce:
1. Install Suns JDK, then the Blackdown one.  Select Blackdown as the systemwide default (to be able to compile openoffice).
2. As a non-root user, run "java-config --set-user-vm=sun-jdk-1.4.2.02"
3. (Optional, it makes no difference) log out, log in again (optionally: run env-update as root, reboot).
4. java -version shows the Blackdown version.
5. print-env | grep -i java also refers to the Blackdown version

Actual Results:  
The Blackdown java was still used

Expected Results:  
The Sun java should have been used instead.
Comment 1 Boris Guskee 2003-12-28 07:48:58 UTC
Created attachment 22743 [details, diff]
patch against jc_options.py in /usr/lib/python2.2/site-packages/java_config/

java --set-user-vm=xxx now creates ~/.gentoo/java.csh and
~/.gentoo.java-env.csh
tcsh users may want to source these files in their .tcshrc file

I'm confident that this patch creates valid tcsh syntax and does not break
anything for bash users, but you may really want to doublecheck this out.
Comment 2 Jason A. Mobarak (RETIRED) gentoo-dev 2003-12-29 17:07:25 UTC
Thank you for the patch! I'm going to add parts of it to the next release.

config_file and config_path where supposed to be used to allow the file that the generated env.d entry was outputed to to change easily -- but aparently I missed actually using those variables.
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-01 04:43:19 UTC
Added to JAVA_CONFIG_1_1_8 branch.
Comment 4 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-02 13:21:12 UTC
In versions 1.1.8 and 1.2.0 in portage now.
Comment 5 Jakob Schiotz 2004-01-06 03:15:29 UTC
Thank you very much for fixing this!  I emerged 1.1.18 (I suppose that is OK although it is masked) and tried it.  It appears to be working.
Comment 6 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-06 12:44:24 UTC
Your welcome, I'll stabilize 1.1.8 in about a week if I don't any bug reports.
Comment 7 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-09 14:41:47 UTC
Version 1.1.8 is stable.