diff options
author | Thomas Matthijs <axxo@gentoo.org> | 2005-11-22 13:26:17 +0000 |
---|---|---|
committer | Thomas Matthijs <axxo@gentoo.org> | 2005-11-22 13:26:17 +0000 |
commit | 06abd8a71486dab9651255696df9f0b13afe9794 (patch) | |
tree | 42f341190680c267c4955898326602fa3a04ea31 | |
parent | java-config now outputs help when called without arguments. (diff) | |
download | java-config-06abd8a71486dab9651255696df9f0b13afe9794.tar.gz java-config-06abd8a71486dab9651255696df9f0b13afe9794.tar.bz2 java-config-06abd8a71486dab9651255696df9f0b13afe9794.zip |
stupid stupid
svn path=/java-config-ng/branches/axxo/; revision=1405
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | src/java_config/EnvironmentManager.py | 9 | ||||
-rw-r--r-- | src/java_config/VM.py | 13 |
3 files changed, 13 insertions, 11 deletions
@@ -5,7 +5,7 @@ import os setup ( name = 'java-config', - version = '2.0.17', + version = '2.0.18', description = 'java enviroment configuration tool', long_description = \ """ diff --git a/src/java_config/EnvironmentManager.py b/src/java_config/EnvironmentManager.py index 998c908..ff8e177 100644 --- a/src/java_config/EnvironmentManager.py +++ b/src/java_config/EnvironmentManager.py @@ -295,11 +295,12 @@ class EnvironmentManager: stream.write(target['format'] % ("CLASSPATH", ':'.join(classpath))) stream.close() - def have_provider(self, virtual): - if self.get_virtuals().has_key(virtual): - return True + def have_provider(self, virtuals): + for virtual in virtuals.split(): + if not self.get_virtuals().has_key(virtual): + return False - return False + return True EnvironmentManager = EnvironmentManager() diff --git a/src/java_config/VM.py b/src/java_config/VM.py index 56f511d..e9f300d 100644 --- a/src/java_config/VM.py +++ b/src/java_config/VM.py @@ -86,11 +86,12 @@ class VM: return self.config['PROVIDES'].split(' ') return [] - def provides(self, virt): - if self.config.has_key('PROVIDES'): - vp = self.config['PROVIDES'].split(' ') - if virt in vp: - return True - return False + def provides(self, virtuals): + for virtual in virtuals: + if self.config.has_key('PROVIDES'): + vp = self.config['PROVIDES'].split(' ') + if virtual not in vp: + return False + return True # vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: |