Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46231 - java-config not setting user CLASSPATH for tcsh users
Summary: java-config not setting user CLASSPATH for tcsh users
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on: 89937
Blocks: 31468
  Show dependency tree
 
Reported: 2004-03-30 04:43 UTC by Keith Burch
Modified: 2005-07-12 17:19 UTC (History)
2 users (show)

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


Attachments
patch for jc_options to add this functionality (jc_options.py.diff,4.08 KB, patch)
2004-03-30 04:45 UTC, Keith Burch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Burch 2004-03-30 04:43:24 UTC
When running the java-config utility for setting the user specific CLASSPATH it only generates files for bash/sh compatible shells in the user $HOME/.gentoo directory.  It does not generate the files which can be included in tcsh/csh compatible shells.

Reproducible: Always
Steps to Reproduce:
1.  Run any of the user specific CLASSPATH commands (--set-user-classpath, --append-user-classpath, etc.) passing in the desired packages.
2.  Inspect the .gentoo directory contents
3.  Only java-env, java-env-classpath are created

Actual Results:  
Could not source the generated files to include in my environment using tcsh

Expected Results:  
Created java-env.csh and java-env-classpath.csh (assuming that is what these
files are to be named)

I am currently using the latest java-config.



*  dev-java/java-config
      Latest version available: 1.2.6
      Latest version installed: 1.2.6
      Size of downloaded files: 12 kB
      Homepage:    http://www.gentoo.org/
      Description: Java enviroment configuration tool
      License:     GPL-2
Comment 1 Keith Burch 2004-03-30 04:45:34 UTC
Created attachment 28366 [details, diff]
patch for jc_options to add this functionality

This is my first attempt at programming python and making a patch, so use if
you want.  It is working on my system using tcsh, and seems to be generating
the correct bash files.
Comment 2 Jason A. Mobarak (RETIRED) gentoo-dev 2004-04-12 23:18:08 UTC
I'll try to integrate this a bit later, the current patch is a little to much of a hacker solution (no offense), some abstraction of the process of setting a user CLASSPATH would be better -- if you have time feel free to submit another patch otherwise I'll work on it later. 
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-30 21:16:27 UTC
I'll implement this in version 1.3.x of java-config, which will be a partial re-write.
Comment 4 Georg Müller 2004-07-31 19:01:11 UTC
An other issue that would be nice to see in java-config 1.3.x is, that I don't have to add some code to my .bashrc by myself. 
Without setting this, the stuff of --set-user-* never works.
Or am I missing something?
Comment 5 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-31 20:45:24 UTC
No having to add something to your .bashrc would be tricky, since have java-config  edit a user's .bashrc, looking for the java-config stuff might a good thing to add to some other part of the infrastructure. I'll have to do some research to figure what'd be the best place.
Comment 6 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-31 21:50:49 UTC
A more coherent version:

Not having to add something to your .{c,ba}shrc would be tricky, since it would be bad idea to have java-config  edit a user's .bashrc. Ideally some part of base system infrastructure should look for java-config's $HOME/.gentoo files and try to source them. I'll have to do some research to figure out exactly how to do this.
Comment 7 Joseph Booker 2004-09-18 16:16:56 UTC
did someone forgot to mark this as FIXED?
Comment 8 Thomas Matthijs (RETIRED) gentoo-dev 2005-07-12 17:19:24 UTC
setting a user and system classpath though java-config will be deprecated in the 
next version

if you want todo this put something like:
export CLASSPATH="${CLASSPATH}:$(java-config -p pkg1,pkh2)"
in your .profile (if using bash)
i'm sure tcsh can do the same