public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/java-config:master commit in: src/
@ 2013-12-27 11:28 Ralph Sennhauser
  0 siblings, 0 replies; 3+ messages in thread
From: Ralph Sennhauser @ 2013-12-27 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     1362e25fd787ba80ab92332aa07fc56f2f3d7767
Author:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 25 15:03:11 2013 +0000
Commit:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
CommitDate: Wed Dec 25 15:03:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=1362e25f

Remove long deprecated options from java-config

Drop the following options from the java-config client:
  --set-system-classpath
  --append-system-classpath
  --clean-system-classpath
  --set-user-classpath
  --append-user-classpath
  --clean-user-classpath

---
 src/java-config-2 | 111 ------------------------------------------------------
 1 file changed, 111 deletions(-)

diff --git a/src/java-config-2 b/src/java-config-2
index 8ad2539..81e50b3 100755
--- a/src/java-config-2
+++ b/src/java-config-2
@@ -213,81 +213,6 @@ def set_user_vm(option, opt, value, parser):
             except InvalidConfigError as e:
                 fatalError("Target file already exists and is not a symlink: %s" % e.file)
 
-# Deprecated
-def system_classpath_target():
-    # TODO: MAKE THIS MODULAR!! (compnerd)
-    return [{'file': manager.eprefix + '/etc/env.d/21java-classpath', 'format': '%s=%s\n' }]
-
-def user_classpath_target():
-    # TODO: MAKE THIS MODULAR!! (compnerd)
-    return [
-            {'file': os.path.join(os.environ.get("HOME"), '.gentoo' + manager.eprefix + '/java-env-classpath'),     'format': 'export %s=%s\n' },
-            {'file': os.path.join(os.environ.get("HOME"), '.gentoo' + manager.eprefix + '/java-env-classpath.csh'), 'format': 'setenv %s %s\n' }
-        ]
-# Deprecated
-def set_system_classpath(option, opt, value, parser):
-    deprecation_notice()
-    if os.getuid() is 0:
-        pkgs = value.split(',')
-        manager.set_classpath(system_classpath_target(), pkgs)
-        
-        for package in pkgs:
-            printer._printError("Package %s was not found!" % package)
-            
-        update_env()
-    else:
-       fatalError("You do not have enough permissions to set the system classpath!")
-
-# Deprecated
-def set_user_classpath(option, opt, value, parser):
-    deprecation_notice()
-    pkgs = value.split(',')
-    manager.set_classpath(user_classpath_target(), pkgs)
-
-    for package in pkgs:
-        printer._printError("Package %s was not found!" % package)
-
-    user_update_env()
-
-# Deprecated
-def append_system_classpath(option, opt, value, parser):
-    deprecation_notice()
-    if os.getuid() is 0:
-        pkgs = value.split(',')
-        manager.append_classpath(system_classpath_target(), pkgs)
-
-        for package in pkgs:
-            printer._printError("Package %s was not found!" % package)
-
-        update_env()
-    else:
-        fatalError("You do not have enough permissioins to append to the system classpath!")
-
-# Deprecated
-def append_user_classpath(option, opt, value, parser):
-    deprecation_notice()
-    pkgs = value.split(',')
-    manager.append_classpath(user_classpath_target(),  pkgs)
-
-    for package in pkgs:
-        printer._printError("Package %s was not found!" % package)
-
-    user_update_env()
-
-# Deprecated
-def clean_system_classpath(option, opt, value, parser):
-    deprecation_notice()
-    if os.getuid() is 0:
-        manager.clean_classpath(system_classpath_target())
-        update_env()
-    else:
-        fatalError("You do not have enough permissions to clean the system classpath!")
-
-# Deprecated
-def clean_user_classpath(option, opt, value, parser):
-    deprecation_notice()
-    manager.clean_classpath(user_classpath_target())
-
 def select_vm(option, opt, value, parser):
     if value == '':
         return
@@ -298,15 +223,6 @@ def select_vm(option, opt, value, parser):
     else:
         fatalError("The vm could not be found")
 
-def update_env():
-    printer._print(getoutput(manager.eprefix + "/usr/sbin/env-update"))
-    printer._printAlert("If you want the changes too take effect in your current session, you should update\n\
-            your environment by running: source " + manager.eprefix + "/etc/profile")
-
-def user_update_env():
-    printer._printAlert("Environment files in ~/.gentoo" + manager.eprefix + "/ have been updated. You should source these from your shell's profile.\n\
-            If you want the changes too take effect in your current sessiosn, you should resource these files")
-
 def deprecation_notice():
     printer._printWarning("Setting a user and system classpath is deprecated, this option will be removed from future versions.")
 
@@ -428,33 +344,6 @@ if __name__ == '__main__':
                     help="Set the default Java VM for the user")
     parser.add_option_group(group)
 
-    # Doomed
-    group = OptionGroup(parser, "TO BE REMOVED",
-                        "Those options will soon be removed.")
-    group.add_option("-A", "--set-system-classpath",
-                    action="callback", callback=set_system_classpath,
-                    type="string", dest="package(s)",
-                    help="Set the system classpath to include the libraries")
-    group.add_option("-B", "--append-system-classpath",
-                    action="callback", callback=append_system_classpath,
-                    type="string", dest="package(s)",
-                    help="Append the libraries to the system classpath")
-    group.add_option("-X", "--clean-system-classpath",
-                    action="callback", callback=clean_system_classpath,
-                    help="Clean the current system classpath")
-    group.add_option("-a", "--set-user-classpath",
-                    action="callback", callback=set_user_classpath,
-                    type="string", dest="package(s)",
-                    help="Set the user classpath to include the libraries")
-    group.add_option("-b", "--append-user-classpath",
-                    action="callback", callback=append_user_classpath,
-                    type="string", dest="package(s)",
-                    help="Append the libraries to the user classpath")
-    group.add_option("-x", "--clean-user-classpath",
-                    action="callback", callback=clean_user_classpath,
-                    help="Clean the current user classpath")
-    parser.add_option_group(group)
-
     if len(sys.argv) < 2: 
         parser.print_help()
     else:


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/java-config:master commit in: src/
@ 2013-12-28 13:15 Ralph Sennhauser
  0 siblings, 0 replies; 3+ messages in thread
From: Ralph Sennhauser @ 2013-12-28 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     8bc6acaf1226e7b76140dda4c67fcf04290a0a7e
Author:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 28 10:05:01 2013 +0000
Commit:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 12:28:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=8bc6acaf

Deprecation notice for setting system and user vm

Adopt deprecation_notice for:
  --set-system-vm
  --set-user-vm

Users are adviced to use eselect java-vm instead.

---
 src/java-config-2 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/java-config-2 b/src/java-config-2
index 81e50b3..62a34ef 100755
--- a/src/java-config-2
+++ b/src/java-config-2
@@ -175,6 +175,8 @@ def print_environment(option, opt, value, parser):
         fatalError("Could not find a vm matching: %s" % value)
 
 def set_system_vm(option, opt, value, parser):
+    deprecation_notice()
+
     vm = manager.get_vm(value)
 
     if not vm:
@@ -194,6 +196,8 @@ def set_system_vm(option, opt, value, parser):
             fatalError("Target file already exists and is not a symlink: %s" % e.file)
 
 def set_user_vm(option, opt, value, parser):
+    deprecation_notice()
+
     vm = manager.get_vm(value)
 
     if not vm:
@@ -224,7 +228,7 @@ def select_vm(option, opt, value, parser):
         fatalError("The vm could not be found")
 
 def deprecation_notice():
-    printer._printWarning("Setting a user and system classpath is deprecated, this option will be removed from future versions.")
+    printer._printWarning("Setting user and system vm using java-config is deprecated, use eselect java-vm instead.")
 
 def fatalError(msg):
     printer._printError(msg)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/java-config:master commit in: src/
@ 2023-11-14 13:52 Florian Schmaus
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Schmaus @ 2023-11-14 13:52 UTC (permalink / raw
  To: gentoo-commits

commit:     951de94124539904d9aa498d89ae8f0daf8aa508
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 14 11:36:15 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Nov 14 11:38:42 2023 +0000
URL:        https://gitweb.gentoo.org/proj/java-config.git/commit/?id=951de941

gjl: obtain library directory via LIBDIR

Newer versions of java-config-2.eclass will record LIBDIR in
package.env, which we obtain in gjl and use to set java.library.path
when invoking the Java VM.

Bug: https://bugs.gentoo.org/917326
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 src/gjl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/gjl b/src/gjl
index 1639ef2..1baa899 100755
--- a/src/gjl
+++ b/src/gjl
@@ -47,7 +47,15 @@ def get_args(pkg):
     envlp = os.getenv('LD_LIBRARY_PATH')
     envjlp = os.getenv('JAVA_LIBRARY_PATH')
 
-    newlibrary = manager.eprefix + '/lib:'+ manager.eprefix + '/usr/lib'
+    libdir = pkg.query('LIBDIR')
+    if libdir:
+        newlibrary = manager.eprefix + '/' + libdir
+    else:
+        # Old, obsolete fallback path for packages that where
+        # installed before java-utils-2.eclass recorded LIBDIR.
+        # Bug #917326.
+        newlibrary = manager.eprefix + '/lib:'+ manager.eprefix + '/usr/lib'
+
     if library:
         newlibrary = ':'.join((library, newlibrary))
     if envjlp:


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-14 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 13:15 [gentoo-commits] proj/java-config:master commit in: src/ Ralph Sennhauser
  -- strict thread matches above, loose matches on Subject: below --
2023-11-14 13:52 Florian Schmaus
2013-12-27 11:28 Ralph Sennhauser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox