[gentoo-commits] proj/java-config:master commit in: src/java_config_2/, src/

2023-11-16 Thread Florian Schmaus
commit: 596a444b7e25d5716d2c4c5579b61b95647eb116
Author: Florian Schmaus  gentoo  org>
AuthorDate: Fri Nov 17 07:55:39 2023 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Fri Nov 17 07:56:05 2023 +
URL:https://gitweb.gentoo.org/proj/java-config.git/commit/?id=596a444b

Update copyright header and other minor text updates

Signed-off-by: Florian Schmaus  gentoo.org>

 src/depend-java-query   | 2 +-
 src/gjl | 2 +-
 src/java-config | 6 +++---
 src/java_config_2/EnvironmentManager.py | 4 ++--
 src/java_config_2/Errors.py | 6 +++---
 src/java_config_2/FileParser.py | 4 ++--
 src/java_config_2/OutputFormatter.py| 4 ++--
 src/java_config_2/Package.py| 4 ++--
 src/java_config_2/VM.py | 6 +++---
 src/java_config_2/VersionManager.py | 4 ++--
 src/java_config_2/Virtual.py| 5 ++---
 11 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/src/depend-java-query b/src/depend-java-query
index 394b7e3..f1feefa 100755
--- a/src/depend-java-query
+++ b/src/depend-java-query
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
-# Copyright 2004-2013 Gentoo Foundation
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from java_config_2.OutputFormatter import OutputFormatter

diff --git a/src/gjl b/src/gjl
index b5eafbe..cca708a 100755
--- a/src/gjl
+++ b/src/gjl
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
-# Copyright 2004-2013 Gentoo Foundation
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from java_config_2.OutputFormatter import *

diff --git a/src/java-config b/src/java-config
index 3f140b8..5914de4 100755
--- a/src/java-config
+++ b/src/java-config
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
-# Copyright 2004-2018 Gentoo Authors
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from java_config_2.OutputFormatter import OutputFormatter
@@ -190,9 +190,9 @@ if __name__ == '__main__':
 
 usage = f"""java-config [options]
 Java Configuration Utility Version {java_config_2.version}
-Copyright 2004-2013 Gentoo Foundation
+Copyright 2004-2023 Gentoo Authors
 Distributed under the terms of the GNU General Public License v2
-Please contact the Gentoo Java Herd  with problems."""
+Please contact the Gentoo Java Project  with problems."""
 
 parser = OptionParser(usage)
 parser.add_option("-V", "--version",

diff --git a/src/java_config_2/EnvironmentManager.py 
b/src/java_config_2/EnvironmentManager.py
index 9e64e4e..a862a04 100644
--- a/src/java_config_2/EnvironmentManager.py
+++ b/src/java_config_2/EnvironmentManager.py
@@ -1,5 +1,5 @@
-# -*- coding: UTF-8 -*-
-# Copyright 2004-2013 Gentoo Foundation
+# -*- coding: utf-8 -*-
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from .OutputFormatter import *

diff --git a/src/java_config_2/Errors.py b/src/java_config_2/Errors.py
index 0d0798b..940ebb0 100644
--- a/src/java_config_2/Errors.py
+++ b/src/java_config_2/Errors.py
@@ -1,5 +1,5 @@
-# -*- coding: UTF-8 -*-
-# Copyright 2004-2013 Gentoo Foundation
+# -*- coding: utf-8 -*-
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 
@@ -51,4 +51,4 @@ class UnexistingPackageError(Exception):
 def __str__(self):
 return "Package %s was not found!" % self.package
 
-# vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap:
\ No newline at end of file
+# vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap:

diff --git a/src/java_config_2/FileParser.py b/src/java_config_2/FileParser.py
index 1590034..adc6aba 100644
--- a/src/java_config_2/FileParser.py
+++ b/src/java_config_2/FileParser.py
@@ -1,5 +1,5 @@
-# -*- coding: UTF-8 -*-
-# Copyright 2004-2013 Gentoo Foundation
+# -*- coding: utf-8 -*-
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 

diff --git a/src/java_config_2/OutputFormatter.py 
b/src/java_config_2/OutputFormatter.py
index 0d3da81..fffd751 100644
--- a/src/java_config_2/OutputFormatter.py
+++ b/src/java_config_2/OutputFormatter.py
@@ -1,5 +1,5 @@
-# -*- coding: UTF-8 -*-
-# Copyright 2004-2013 Gentoo Foundation
+# -*- coding: utf-8 -*-
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import sys

diff --git a/src/java_config_2/Package.py b/src/java_config_2/Package.py
index 83c8c89..6328efa 100644
--- a/src/java_config_2/Package.py
+++ b/src/java_config_2/Package.py
@@ -1,5 +1,5 @@
-# -*- coding: UTF-8 -*-
-# Copyright 2004-2013 Gentoo Foundation
+# -*- coding: utf-8 -*-
+# Copyright 2004-2023 Gentoo Authors
 # Distributed under the terms of the GNU Gen

[gentoo-commits] proj/java-config:master commit in: src/java_config_2/

2020-07-16 Thread Patrice Clement
commit: d9ac25402fa9ff918e1f1da4e3e0d97281e437c4
Author: Patrice Clement  gentoo  org>
AuthorDate: Thu Jul 16 20:46:02 2020 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Thu Jul 16 20:48:34 2020 +
URL:https://gitweb.gentoo.org/proj/java-config.git/commit/?id=d9ac2540

allow java-config to parse inverted conditions.

... aka exclamation marks.

Patch courtesy of njsg on IRC.

Signed-off-by: Patrice Clement  gentoo.org>

 src/java_config_2/VersionManager.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/java_config_2/VersionManager.py 
b/src/java_config_2/VersionManager.py
index cb30e88..a876f02 100644
--- a/src/java_config_2/VersionManager.py
+++ b/src/java_config_2/VersionManager.py
@@ -110,7 +110,11 @@ class VersionManager:
 
 for token in tokens:
 if token[-1] == "?":
-if token[:-1] not in useflags:
+if token.startswith("!"):
+skip = token[1:-1] in useflags
+else:
+skip = token[:-1] not in useflags
+if skip:
 level = 0
 while 1:
 token = next(tokens)



[gentoo-commits] proj/java-config:master commit in: src/java_config_2/

2017-09-08 Thread Patrice Clement
commit: 82a5a6343e7b6172af6aaa1b3ea0a61a43afd206
Author: Patrice Clement  gentoo  org>
AuthorDate: Wed Jul 19 14:04:10 2017 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Wed Jul 19 14:04:10 2017 +
URL:https://gitweb.gentoo.org/proj/java-config.git/commit/?id=82a5a634

remove useless else clauses.

 src/java_config_2/Package.py | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/java_config_2/Package.py b/src/java_config_2/Package.py
index 2ecacc3..83c8c89 100644
--- a/src/java_config_2/Package.py
+++ b/src/java_config_2/Package.py
@@ -59,8 +59,7 @@ class Package:
 """
 if var in self._config:
 return self._config[var]
-else:
-return None
+return None
 
 def deps(self):
 """
@@ -76,13 +75,12 @@ class Package:
 
 def __get_deps(self, query):
 """
-Return package's (optional) dependencies;
-@param query: variable to read from package.env
+Return a package's (optional) dependencies.
+@param query: variable to read from package.env.
 """
 depstr = self.query(query)
 if depstr:
 return [dep.split("@") for dep in depstr.split(":")]
-else:
-return []
+return []
 
-# vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap:
\ No newline at end of file
+# vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: