Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66969 - JAVA_HOME not updated after emerge of blackdown-jdk-1.4.2 - java-config -S issue
Summary: JAVA_HOME not updated after emerge of blackdown-jdk-1.4.2 - java-config -S issue
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66903 66970
  Show dependency tree
 
Reported: 2004-10-10 05:50 UTC by Guy
Modified: 2004-10-12 14:51 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 Guy 2004-10-10 05:50:54 UTC
After emerge of blackdown-jdk-1.4.2 while upgrading from blackdown-jdk-1.4.2-rc1, JAVA_HOME is left pointing to /opt/blackdown-jdk-1.4.2_rc1/bin/java or /opt/blackdown-jdk-1.4.2_rc1/jre/bin/java. This is not correct and blocks the emerge of jakartacommons.
Comment 1 Guy 2004-10-10 05:58:47 UTC
You can see this from attempting to emerge jakartacommons:

==.oOo.==

Started emerge on: Oct 11, 2004 08:43:30
 *** emerge --update --verbose jakartacommons
Calculating dependencies  
 >>> emerge (1 of 4) dev-java/commons-httpclient-2.0.1 to /
 === (1 of 4) Cleaning (dev-java/commons-httpclient-2.0.1::/usr/portage/dev-java/commons-httpclient/commons-httpclient-2.0.1.ebuild)]2; === (1 of 4) Compiling/Merging (dev-java/commons-httpclient-2.0.1::/usr/portage/dev-java/commons-httpclient/commons-httpclient-2.0.1.ebuild)>>> Unpacking source...
>>> Unpacking commons-httpclient-2.0.1-src.tar.gz to /var/tmp/portage/commons-httpclient-2.0.1/work
tar: Archive contains obsolescent base-64 headers
tar: A lone zero block at 23653
 Applying gentoo.diff...
>>> Source unpacked.
jikes
doc
jc_options: java not found at /opt/blackdown-jdk-1.4.2_rc1/bin/java or /opt/blackdown-jdk-1.4.2_rc1/jre/bin/java

Error: JAVA_HOME is not defined correctly.
  We cannot execute 

!!! ERROR: dev-java/commons-httpclient-2.0.1 failed.
!!! Function src_compile, Line 33, Exitcode 1
!!! compilation failed

This machine is a newly built machine as of last week. There may be other missing dependency issues.
Comment 2 Thomas Matthijs (RETIRED) gentoo-dev 2004-10-10 06:07:46 UTC
this is because of a bug in java-config
---
jc_options: More than one VM matched the request
Matches:
        blackdown-jdk-1.4.2_rc1
        blackdown-jdk-1.4.2
---

The partial -S matching that was added some time ago should use the exact match if there is one

you can do 
$ java-config -S blackdown-jdk-1.4.2
$ env-update
to fix it manualy
Comment 3 Thomas Matthijs (RETIRED) gentoo-dev 2004-10-10 06:37:34 UTC
quick & dirty fix for java-config

--- java_config/jc_envgen.py      2004-07-03 08:33:44.000000000 +0200
+++ java_config/jc_envgen.py   2004-10-10 15:33:46.245534920 +0200
@@ -16,6 +16,11 @@
        '''
 
        vms = collect_vms()
+
+       for vm in vms.keys():
+               if vm.lstrip('20') == name:
+                       return vms[vm]
+                       
        matches = [
                S for S in vms.keys()
                if S.lstrip('20').startswith(name) 
Comment 4 Guy 2004-10-10 06:46:11 UTC
Thank you Thomas.

The setting java-config worked.

BTW - I had re-emerged java-config in the {vain} hope it would fix the problem. However, it didn't which is why I reported it here. I've tried to set JAVA_HOME using java-config in the past but am too ignorant to understand what the settings _should_ be.

I don't know / understand if this bug should be closed. I feel, however, that emerging an upgrade of blackdown-jdk to handle this automatically. So I'll leave that up to you.

I will be opening a new bug. jarkartacommons is now failing to build. :-( Oh well.
Comment 5 Thomas Matthijs (RETIRED) gentoo-dev 2004-10-10 06:56:53 UTC
its handled automaticly, but there is a bug in java-config that prevents it in this case
i have masked the new blackdown-jdk untill java-config can be fixed and the upgrade path will work without intervention
Comment 6 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-10-10 12:15:55 UTC
Patch for this in java-config now. We just have to make a new release of it.
Comment 7 Thomas Matthijs (RETIRED) gentoo-dev 2004-10-12 14:51:17 UTC
new java-config release, blackdown 1.4.2 depends on it & unmasked