Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28869 - java-config --list-available-packages only looks in /usr/share
Summary: java-config --list-available-packages only looks in /usr/share
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jason A. Mobarak (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 31468
  Show dependency tree
 
Reported: 2003-09-16 04:54 UTC by Bert Van Vreckem
Modified: 2004-01-09 14:40 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bert Van Vreckem 2003-09-16 04:54:54 UTC
When searching for available packages, java-config only looks in the /usr/share
directory. This is not desirable: some packages may be installed in /opt (e.g.
J2EE) or in /usr/local/share. These cannot be added to the classpath...

A workaround is provided on the Gentoo forums:
http://forums.gentoo.org/viewtopic.php?t=56715. This is less than perfect as it
involves fidgeting with the /usr/share directory.

Reproducible: Always
Steps to Reproduce:
Comment 1 Jason A. Mobarak (RETIRED) gentoo-dev 2003-11-16 17:54:21 UTC
Idea for how to fix this in java-config 1.1.5: generate a env.d entry and print it out.
Comment 2 Jason A. Mobarak (RETIRED) gentoo-dev 2003-11-20 10:40:20 UTC
Previous comment was bogus, sorry.<br>
<br>
Since ebuilds can install packages anywhere, adding /opt and /usr/share/local<br> will only be temporary fix, right?<br>
<br>
I'm guess I'm open to suggestions for how this can be fixed in a more <br>
permanent way.<br>
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2003-11-20 10:41:06 UTC
Btw, I hate bugzilla.
Comment 4 Jason A. Mobarak (RETIRED) gentoo-dev 2003-12-29 01:40:18 UTC
AFAIK ebuilds can install java packages where ever they want. So how to decide where to look for packages is a problem. It should be a configurable option so it can change easily. Where to configure it is another problem. Some options for configuration are using a --option directive, an environment variable, and/or a configuration file. So far I think a configuration file is the best alternative, so the problem with cron breaking java-config can be avoided.
Comment 5 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2003-12-29 16:41:02 UTC
Ok, what about this:

Each Portage-installed package installs a symlink in /usr/share/java/packages, that points to the package's environment file. 

This happens regardless of whether the actual package.env file is stuffed into /usr or /opt.

Example:

dev-java/ant-1.5.4-r1 would install the symlink named 'ant-1.5.4-r1' in /usr/share/java/packages, that pointed to /usr/share/ant/package.env

Furthermore, java-config will also scan /usr/local/share/java/packages, so that user-installed packages will enjoy the same benefits without having to muck about in /usr.


Note: it may happen that two packages have the same name, but live in different categories. In this case, the naming scheme adopted above with just the packagename-version-revision won't work; we should then append category_; example: dev-java_ant-1.5.4-r1, but this should be the exception rather than the rule, and it should be handled by the java eclass.
Comment 6 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-02 13:17:15 UTC
This has been implemented as per karltk's suggestions, all ebuilds need to do is utilize it -- fix is in 1.1.8 and 1.2.0 .
Comment 7 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-09 14:40:44 UTC
Version 1.1.8 is stable.