summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2006-06-28 13:29:45 +0000
committerJoshua Nichols <nichoj@gentoo.org>2006-06-28 13:29:45 +0000
commitb578b4e882a1fb5867dd787e7d84d32ae4829163 (patch)
treeeead27fab165f60139b590479feb3f5d1a58f9c4
parentApplied a forgotten patch. (diff)
downloadjava-config-b578b4e882a1fb5867dd787e7d84d32ae4829163.tar.gz
java-config-b578b4e882a1fb5867dd787e7d84d32ae4829163.tar.bz2
java-config-b578b4e882a1fb5867dd787e7d84d32ae4829163.zip
Renamed java-config.1 to java-config-2.1, and updated setup.py accordingly.
svn path=/java-config-ng/branches/axxo/; revision=2391
-rw-r--r--man/java-config-2.1 (renamed from man/java-config.1)0
-rw-r--r--setup.py2
-rw-r--r--src/java_config/VersionManager.py23
3 files changed, 24 insertions, 1 deletions
diff --git a/man/java-config.1 b/man/java-config-2.1
index 23c0672..23c0672 100644
--- a/man/java-config.1
+++ b/man/java-config-2.1
diff --git a/setup.py b/setup.py
index 3db9fca..6d2e344 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ setup (
scripts = ['src/java-config-2','src/depend-java-query','src/run-java-tool', 'src/gjl'],
data_files = [
('share/java-config-2/pym/java_config/', ['src/java_config/'+file for file in listdir('src/java_config/')] ),
- ('share/man/man1', ['man/java-config.1']),
+ ('share/man/man1', ['man/java-config-2.1']),
('share/java-config-2/launcher', ['src/launcher.bash']),
('share/eselect/modules', ['src/eselect/java-vm.eselect']),
('/etc/java-config-2/', ['config/virtuals']),
diff --git a/src/java_config/VersionManager.py b/src/java_config/VersionManager.py
index 3367dc4..aba2615 100644
--- a/src/java_config/VersionManager.py
+++ b/src/java_config/VersionManager.py
@@ -23,6 +23,29 @@ class VersionManager:
"""
#atom_parser = re.compile(r"([~!<>=]*)virtual/(jre|jdk)-([0-9\.]+)")
atom_parser = re.compile(r"([<>=]+)virtual/(jre|jdk)-([0-9\.*]+)")
+ or_parser = re.compile(r"\|\| \( (.*) \)")
+ # TODO have a || parser
+ # TODO have a java use flag parser
+ re.compile(r"([<>=]+)virtual/(jre|jdk)-([0-9\.*]+)")
+ or_parser = re.compile(r"\|\| \( (.*) \)")
+ # TODO have a || parser
+ # TODO have a java use flag parser
+ pref_files = ['/etc/java-config-2/build/jdk.conf', '/usr/share/java-config-2/config/jdk-defaults.conf']
+ _prefs = None
+
+ def __init__(self):
+ pass
+
+ def get_prefs(self):
+ if self._prefs:
+ return self._prefs
+ else:
+ self._prefs = []
+ for file in self.pref_files:
+ if os.path.exists(file):
+ self._prefs += PrefsFileParser(file).get_config()
+ return self._prefs
+
pref_files = ['/etc/java-config-2/build/jdk.conf', '/usr/share/java-config-2/config/jdk-defaults.conf']
_prefs = None