Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 235701

Summary: java-check-environment doesn't use slot syntax for recommended fixes
Product: Gentoo Linux Reporter: Shaun Bouckaert <shaun.bouckaert>
Component: [OLD] JavaAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Updates the version based package references to slotted references where appropriate.

Description Shaun Bouckaert 2008-08-25 18:44:22 UTC
The java-check-environment command doesn't use the slot syntax for emerge when recommending a fix for no system generation-1 VM, instead using version syntax.

Viewing the source of java-check-environment showed a list of version syntax packages as well.

Reproducible: Always

Steps to Reproduce:
1. Ensure no system generation-1 VM is configured.
2. run java-check-environment

Actual Results:  
 * No Generation-1 System VM is set! (no /etc/env.d/20java)
 * It doesn't look like java-config-1 sees any installed VMs.
 * It is most likely because you don't have a 1.4 JDK installed
 * This is required for generation-1 to work properly.
 * You will want to emerge =virtual/jdk-1.4*

Expected Results:  
 * No Generation-1 System VM is set! (no /etc/env.d/20java)
 * It doesn't look like java-config-1 sees any installed VMs.
 * It is most likely because you don't have a 1.4 JDK installed
 * This is required for generation-1 to work properly.
 * You will want to emerge virtual/jdk:1.4

The following code also exists in the source:

            if [[ ${handle} =~ "^kaffe" ]]; then
                                ATOM=">=dev-java/kaffe-1.1.7"
                        elif [[ ${handle} =~ "^blackdown-jdk" ]]; then
                                ATOM=">=dev-java/blackdown-jdk-1.4.2.03-r12"
                        elif [[ ${handle} =~ "^blackdown-jre" ]]; then
                                ATOM=">=dev-java/blackdown-jre-1.4.2.03-r11"
                        elif [[ ${handle} =~ "^ibm-jdk-bin-1.4" ]]; then
                                ATOM="=dev-java/ibm-jdk-bin-1.4.2.5*"
                        elif [[ ${handle} =~ "^ibm-jre-bin" ]]; then
                                ATOM="=dev-java/ibm-jre-bin-1.4.2.5*"
                        elif [[ ${handle} =~ "^sun-jdk-1.4" ]]; then
                                ATOM="=dev-java/sun-jdk-1.4.2.12*"
                        elif [[ ${handle} =~ "^sun-jre-bin-1.4" ]]; then
                                ATOM="=dev-java/sun-jre-bin-1.4.2.12*"
                        elif [[ ${handle} =~ "^jrockit-jdk-bin-1.4" ]]; then
                                ATOM="=dev-java/jrockit-jdk-bin-1.4.2.11*"
                        elif [[ ${handle} =~ "^(\w+-)+[0-9]+\.[0-9]+" ]]; then
                            ATOM="=${BASH_REMATCH}*"

While blackdown is not slotted, and kaffe uses non-standard versions, the other jre's and jdk's all have slots and should be using the slotted syntax.
Comment 1 Shaun Bouckaert 2008-08-25 18:45:32 UTC
Created attachment 163771 [details, diff]
Updates the version based package references to slotted references where appropriate.

I have updated the section that suggests a fix for a missing generation 1 vm and also the list of packages that used the old syntax.