Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45266 - seperate use-flag for jdk's requiered
Summary: seperate use-flag for jdk's requiered
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-21 03:17 UTC by Alexander Sandbu
Modified: 2004-07-17 11:20 UTC (History)
0 users

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 Alexander Sandbu 2004-03-21 03:17:33 UTC
I have a (blackdown-)jre installed to run java-apps on webpages. Because of this the java USE-flag gets set, and emerge starts to pull in (blackdown-)jdk, ant etc. for packages like postgresql, db-4.1.25_p1-r3 and kdevelop *although* I do not intend to do any java development.
There should be a more distinct separation between a jre and a jdk

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-21 16:25:57 UTC
Be a bit more verbose in what you're talking about. I'm having trouble following you. You can give me commands you type and their output and your expected out or desired output. Thanks.
Comment 2 Alexander Sandbu 2004-03-23 09:11:07 UTC
When you install a jre (I don't think it matters if it's blackdown or sun or whatever as long as it provides virtual/jre) the java flag gets set, as per the /etc/make.profile/use.defaults file. This is good, since if you have a jre installed you probably want your browser to take advantage of it. BUT this also means that ebuilds like postgresql and kdevelop think you want java support. They're not satisfied with a jre and pull in the whole jdk along with ant and ant-(not-so-)optional.
Comment 3 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-26 23:05:12 UTC
I don't see a problem with this. I think this is the best solution for users as in most cases, people will want that java flag set.
Comment 4 Alexander Sandbu 2004-03-28 04:47:19 UTC
Well yes, I don't see a problem with that flag being set, either. What I would like to see is a seperate flag controlling the use of a jdk. I don't need postgres, kdevelop and php with java support. There should be a jdk-flag for that. All those packages which postgres, php, etc. want when the java flag is set, but that I have no use whatsoever for, amount to a 160 meg download and who-knows-how-much installed...
Comment 5 Andy Daniels 2004-06-11 13:08:41 UTC
You should still be able to manually set -java in your USE flags even if you have a jre installed?  Correct me if I'm wrong on this, but I think it should fix your problem =D

This will still skip optional java dependancies, however hard dependancies will also be covered.
Comment 6 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-06-12 04:47:14 UTC
The problem here is that the JRE cannot in general be used to compile anything
that requires Java support, as the JRE doesn't have javac, nor jar.

This means that the optional support for Java in many packages cannot be
compiled if you only have the JRE installed, which means they actually 
require the JDK to build.

This is also why we've started separating on this issue. In general, we now
require the JDK to be installed at compile-time, but only the JRE to be
installed at runtime.

Thus, if you use the GRPs, which are our prebuilt packages, you will (once
we've finished being consistent about this) for most general cases only
need to have the JRE installed.

Again, note that some Java development packages may of course need the JDK
at runtime as well.

I'm going to add a separate section about this to our upcoming developer 
guide, which means this problem will sort itself out in time, as we refactor
and update our packages.

Comment 7 Alexander Sandbu 2004-06-15 16:39:45 UTC
Would it be such a big problem not automatically setting the java use-flag when a jdk/jre is installed? I see that a jdk/jre is required for openoffice and probably some other packages, but that doesn't mean I want Postgres or KDevelop compiled with java support. I can imagine a good deal of users having ant et c. installed without really needing it.
Comment 8 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-07-17 11:20:18 UTC
With the new additions to java-config, we have solve some of these issues; it will
clearly separate the JRE from the JDK.

Furthermore, I have added a section in the upcoming Java Ebuild Guide that
explains the difference between the virtual/jdk and virtual/jre packages. This
will hopefully, in time, make all packages not maintained by the Java herd
behave properly.

However, as previously stated, if a package has optional support for Java, it
will need to have the JDK installed at compile time. At runtime, it may only
require a JRE.

Please realise that your USE flags are never modified by the installation
of a package.