Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 9045 - dev-java/java-config Patch: Better CLASSPATH Generation
Summary: dev-java/java-config Patch: Better CLASSPATH Generation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-12 12:45 UTC by Steven Wong
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments
java-config.patch (java-config.patch,749 bytes, patch)
2002-10-12 12:48 UTC, Steven Wong
Details | Diff
java-config-0.2.7.ebuild.patch (java-config-0.2.7.ebuild.patch,366 bytes, patch)
2002-10-12 12:49 UTC, Steven Wong
Details | Diff
30java-finalclasspath (30java-finalclasspath,12 bytes, text/plain)
2002-10-12 12:50 UTC, Steven Wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Wong 2002-10-12 12:45:50 UTC
The current java-config generates CLASSPATH's that have two instants of the Java
system libraries. This is because they appear both in /etc/env.d/20java and
/etc/env.d/21java-classpath. '.' entries also occur in both these files.

This leads to a CLASSPATH containing duplicates of each of the above entries.

I've modified java-config so that this no longer happens, and that '.' appears
once, and is always the last entry in the CLASSPATH.

Changes are:

* java-config:
    calc_full_classpath() - I removed the concatenation of '.' to the end of
classpaths. Also, it no longer adds on from the current CLASSPATH env variable
(combining multiple CLASSPATH from different files in /etc/env.d is already
handled by env-update).
    vm_envvars() - normalise_classpath() now gets applied before writing
CLASSPATH entries. normalise_classpath() will remove any '.' paths.

* 30java-finalclasspath (New file):
    This file simply contains "CLASSPATH=." and is placed in the /etc/env.d
directory. This results in a '.' being appened to the generated CLASSPATH.

Attached are:

* The patch for the changes to java-config (generated by 'diff -c java-config
/usr/portage/dev-java/java-config/files/0.2.6/java-config').
* The new 30java-finalclasspath file.
* Patch for creating the new eBuild that will install the
'30java-finalclasspath' file, too.
Comment 1 Steven Wong 2002-10-12 12:48:48 UTC
Created attachment 4635 [details, diff]
java-config.patch
Comment 2 Steven Wong 2002-10-12 12:49:14 UTC
Created attachment 4636 [details, diff]
java-config-0.2.7.ebuild.patch
Comment 3 Steven Wong 2002-10-12 12:50:05 UTC
Created attachment 4637 [details]
30java-finalclasspath
Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-11-03 11:23:46 UTC
Thanks a bundle. I'll get to this as soon as I can. There's some discussion on
changing parts of the java-config stuff now. This is relevant regardless of the
outcome of the debate, but I'd like to introduce most of the updates in one
painful go instead of many small nuisances :)
Comment 5 Adrian Almenar 2002-12-09 16:14:51 UTC
Fixed in java-config-0.2.7.ebuild

Thanks, for the patches.