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

Bug 205731

Summary: java-config-2 query method for Virtual package behaves weirdly for foobar values
Product: Gentoo Linux Reporter: Petteri Räty (RETIRED) <betelgeuse>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 177429    

Description Petteri Räty (RETIRED) gentoo-dev 2008-01-14 02:06:22 UTC
>>> from java_config_2.EnvironmentManager import EnvironmentManager as em
>>> em.get_package("javadoc").query("FOO")
Undefined: FOO
'sun-jdk-1.4 sun-jdk-1.5 sun-jdk-1.6'

Rather than catching the error from the VM and returning the VM property I think we should change the method to throw an error when the key in question is not defined.
Comment 1 Alistair Bush (RETIRED) gentoo-dev 2008-01-19 14:19:48 UTC
InSVN, or at least will be when I commit :)


from java_config_2.EnvironmentManager import EnvironmentManager as em
>>> em.get_package("javadoc").query("FOO")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/alistair/gentoo/overlays/projects/java-config-2/trunk/src/java_config_2/Virtual.py", line 143, in query
    return self.get_provider().query(var)
  File "java_config_2/VM.py", line 39, in query
    raise EnvironmentUndefinedError
java_config_2.Errors.EnvironmentUndefinedError
Comment 2 Alistair Bush (RETIRED) gentoo-dev 2008-11-20 10:41:54 UTC
Fixed, released and stabilised ages ago.