From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E7828138247 for ; Fri, 27 Dec 2013 11:28:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B68ACE0956; Fri, 27 Dec 2013 11:28:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2AAE6E0956 for ; Fri, 27 Dec 2013 11:28:50 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 18F0933F6E7 for ; Fri, 27 Dec 2013 11:28:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9CA17E5604 for ; Fri, 27 Dec 2013 11:28:47 +0000 (UTC) From: "Ralph Sennhauser" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ralph Sennhauser" Message-ID: <1388142083.8120125c466356fbdcce9365e14a605ece206cb0.sera@gentoo> Subject: [gentoo-commits] proj/java-config:master commit in: src/java_config_2/ X-VCS-Repository: proj/java-config X-VCS-Files: src/java_config_2/EnvironmentManager.py X-VCS-Directories: src/java_config_2/ X-VCS-Committer: sera X-VCS-Committer-Name: Ralph Sennhauser X-VCS-Revision: 8120125c466356fbdcce9365e14a605ece206cb0 X-VCS-Branch: master Date: Fri, 27 Dec 2013 11:28:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: febee9dd-693d-40f0-8ad3-113871bc28bb X-Archives-Hash: d775faef3133f232ac898ada4b67d9df commit: 8120125c466356fbdcce9365e14a605ece206cb0 Author: Ralph Sennhauser gentoo org> AuthorDate: Fri Dec 27 11:01:23 2013 +0000 Commit: Ralph Sennhauser gentoo 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()