From: "Ralph Sennhauser" <sera@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/java-config:master commit in: src/java_config_2/
Date: Fri, 27 Dec 2013 11:28:47 +0000 (UTC) [thread overview]
Message-ID: <1388142083.8120125c466356fbdcce9365e14a605ece206cb0.sera@gentoo> (raw)
commit: 8120125c466356fbdcce9365e14a605ece206cb0
Author: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 27 11:01:23 2013 +0000
Commit: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
CommitDate: Fri Dec 27 11:01:23 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=8120125c
Remove unused functions from EnvironmentManager after commit 1362e25
---
src/java_config_2/EnvironmentManager.py | 67 ---------------------------------
1 file changed, 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()
next reply other threads:[~2013-12-27 11:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 11:28 Ralph Sennhauser [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-12-28 13:15 [gentoo-commits] proj/java-config:master commit in: src/java_config_2/ Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2017-09-08 21:22 Patrice Clement
2020-07-16 20:50 Patrice Clement
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388142083.8120125c466356fbdcce9365e14a605ece206cb0.sera@gentoo \
--to=sera@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox