aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2013-12-27 12:01:23 +0100
committerRalph Sennhauser <sera@gentoo.org>2013-12-27 12:01:23 +0100
commit8120125c466356fbdcce9365e14a605ece206cb0 (patch)
treef27a278d5856e2ab2c4660f5ef2a3a11622e9d66
parentRemove long deprecated options from java-config (diff)
downloadjava-config-8120125c466356fbdcce9365e14a605ece206cb0.tar.gz
java-config-8120125c466356fbdcce9365e14a605ece206cb0.tar.bz2
java-config-8120125c466356fbdcce9365e14a605ece206cb0.zip
Remove unused functions from EnvironmentManager after commit 1362e25
-rw-r--r--src/java_config_2/EnvironmentManager.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/java_config_2/EnvironmentManager.py b/src/java_config_2/EnvironmentManager.py
index 8d47e6e..afb80df 100644
--- a/src/java_config_2/EnvironmentManager.py
+++ b/src/java_config_2/EnvironmentManager.py
@@ -269,14 +269,6 @@ class EnvironmentManager(object):
else:
return None
- def clean_classpath(self, targets):
- for target in targets:
- if os.path.isfile(target['file']):
- try:
- os.remove(target['file'])
- except IOError:
- raise PermissionError
-
def add_path_elements(self, elements, path):
if elements:
for p in elements.split(':'):
@@ -290,9 +282,6 @@ class EnvironmentManager(object):
return path
- def build_classpath(self, pkgs):
- return self.build_path(pkgs, "CLASSPATH")
-
def get_pkg_deps(self, pkg):
"""
Returns list of package's deps and optional deps.
@@ -413,62 +402,6 @@ class EnvironmentManager(object):
missing_deps.add(dep[-1])
return env
- def set_classpath(self, targets, pkgs):
- classpath = self.build_classpath(pkgs)
-
- if classpath:
- self.clean_classpath(targets)
-
- self.write_classpath(targets, classpath)
-
- def get_old_classpath(self, target):
- """Returns the current set classpath in the file"""
- oldClasspath = ''
- if os.path.isfile(target['file']):
- try:
- stream = open(target['file'], 'r')
- except IOError:
- raise PermissionError
-
- for line in stream:
- line = line.strip(' \n')
- if line.find('CLASSPATH') != -1:
- try:
- oldClasspath = line.split(target['format'].split('%s')[-2])[-1].strip()
- except:
- pass
- stream.close()
-
- return oldClasspath
-
- def append_classpath(self, targets, pkgs):
- classpath = self.build_classpath(pkgs)
-
- if classpath:
- oldClasspath = None
- for target in targets:
- for cp in self.get_old_classpath(target).split(':'):
- if cp not in classpath:
- classpath.append(cp)
-
- self.clean_classpath(targets)
-
- self.write_classpath(targets, classpath)
-
- def write_classpath(self, targets, classpath):
- for target in targets:
- dir = dirname(target['file'])
- if not os.path.isdir(dir):
- os.makedirs(dir)
-
- try:
- stream = open(target['file'], 'w')
- except IOError:
- raise PermissionError
-
- stream.write(target['format'] % ("CLASSPATH", ':'.join(classpath)))
- stream.close()
-
def have_provider(self, virtuals, virtualMachine, versionManager):
result=True
storeVM = self.get_active_vm()