Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176547 - sci-libs/vtk sets a global CLASSPATH
Summary: sci-libs/vtk sets a global CLASSPATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Markus Dittrich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-30 11:11 UTC by Petteri Räty (RETIRED)
Modified: 2007-05-01 18:10 UTC (History)
2 users (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 Petteri Räty (RETIRED) gentoo-dev 2007-04-30 11:11:14 UTC
betelgeuse@pena /etc/env.d $ qfile 40vtk
sci-libs/vtk (/etc/env.d/40vtk)
betelgeuse@pena /etc/env.d $ cat 40vtk
VTK_DATA_ROOT=/usr/share/vtk/data
VTK_DIR=/usr/lib/vtk-5.0
CLASSPATH=/usr/share/vtk/lib/vtk.jar

Setting a global classpath is problematic because you get the jar to your java classpath even when you might not want to. It should be set in wrapper scripts (created using for example java-pkg_dolauncher). Please contact the java team if you need any help.
Comment 1 Markus Dittrich (RETIRED) gentoo-dev 2007-04-30 12:48:30 UTC
Hi Petteri,

Thanks much for the heads up! Unfortunately, I am not very familiar with
gentoo's way of handling java stuff:( Could you possibly point me to package
in portage that does it properly and think I might be able to go from there.

Thanks for your help.

cheers,
Markus
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-04-30 14:00:23 UTC
(In reply to comment #1)
> Hi Petteri,
> 
> Thanks much for the heads up! Unfortunately, I am not very familiar with
> gentoo's way of handling java stuff:( Could you possibly point me to package
> in portage that does it properly and think I might be able to go from there.
> 
> Thanks for your help.
> 
> cheers,
> Markus
> 

Pretty much everything inheriting java-pkg-opt-2 should be useful. Probably would be useful to add java to metadata.xml so that we can fix these issues ourselves without asking. Basically on Gentoo you the java-config tool to query the installed packages for CLASSPATH or in ebuilds use the eclass functions. Feel free to join #gentoo-java to ask questions.
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2007-05-01 12:37:23 UTC
I had a brief look at the java eclasses and it looks to me that 
java-pkg_dolauncher is not what we want since vtk.jar is only a
library containing some vtk class wrappers. I am not sure if
CLASSPATH is needed at all since I've never compiled java code
against a library located in a jar. 
So, for now I've removed the CLASSPATH part in the ebuild 
completely and added you guys to metadata. So please feel
free to change as you like.

Thanks,
Markus
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-05-01 13:47:08 UTC
(In reply to comment #3)
> I had a brief look at the java eclasses and it looks to me that 
> java-pkg_dolauncher is not what we want since vtk.jar is only a
> library containing some vtk class wrappers. I am not sure if
> CLASSPATH is needed at all since I've never compiled java code
> against a library located in a jar. 

dolauncher is for applications. It creates an intelligent wrapper script that calculates CLASSPATH from dependencies.
Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2007-05-01 17:03:55 UTC
Since the CLASSPATH is gone from 40vtk is it all right
to close this bug then?

Thanks,
Markus
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-01 17:10:47 UTC
(In reply to comment #5)
> Since the CLASSPATH is gone from 40vtk is it all right
> to close this bug then?

I would say so, unless there are ebuilds in tree that depend on that CLASSPATH. But I found only mayavi depending on vtk and that seems to be not using the java part.

Comment 7 Petteri Räty (RETIRED) gentoo-dev 2007-05-01 18:10:45 UTC
(In reply to comment #6)
> 
> I would say so, unless there are ebuilds in tree that depend on that CLASSPATH.
> But I found only mayavi depending on vtk and that seems to be not using the
> java part.
> 

Yeah that's what I was supposed to check too. If that's the case then let's close this.