public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2022-06-24 10:33 Florian Schmaus
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2022-06-24 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     c98ecbb98935a5abaafbf63694be22ba6d940538
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 07:04:13 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 07:04:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=c98ecbb9

java-vm.eselect: whitespaces fixes

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 src/modules/java-vm.eselect.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index 552062f..e332c5a 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -68,7 +68,7 @@ do_list() {
 	local found_build_only
 	if [[ -n ${targets[@]} ]] ; then
 		local i system_name user_name
-	
+
 		[[ -L ${VM_SYSTEM} ]] && system_name=$(sym_to_vm "${VM_SYSTEM}")
 		[[ -L ${VM_USER} ]] && user_name=$(sym_to_vm "${VM_USER}")
 
@@ -133,7 +133,7 @@ do_set() {
 			die -q "Sorry, you don't have enough permission to set system"
 		fi
 	elif [[ ${1} == "user" ]]; then
-		if [[ ${UID} != 0 ]]; then 
+		if [[ ${UID} != 0 ]]; then
 			my_set "${VM_USER}" "${2}" ${ifunset}
 		else
 			die -q "Sorry, you cannot set a user VM as root. Set the system VM instead"


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2024-04-20 11:28 Florian Schmaus
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2024-04-20 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     0e67f002afa93cbea82e077931111acb1fddb3f4
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 18:26:28 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Apr 20 11:28:28 2024 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=0e67f002

java-vm.eselect: fix symlink target when ROOT is not /

Bug: https://bugs.gentoo.org/793965
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 src/modules/java-vm.eselect.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index 8fac2a1..8181b8c 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -1,12 +1,12 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 DESCRIPTION="Manage the Java system and user VM"
 MAINTAINER="java@gentoo.org"
 VERSION="@VERSION@"
 
-VM_BASE="${EROOT}/usr/lib/jvm"
+VM_BASE="${EPREFIX}/usr/lib/jvm"
 VM_SYSTEM="${EROOT}/etc/java-config-2/current-system-vm"
 VM_USER="${HOME}/.gentoo${EPREFIX}/java-config-2/current-user-vm"
 VM_CONFIG="${EROOT}/usr/share/java-config-2/vm"
@@ -14,7 +14,7 @@ VM_CONFIG="${EROOT}/usr/share/java-config-2/vm"
 find_targets() {
 	local TARGETS=() target
 
-	for target in "${VM_BASE}"/*; do
+	for target in "${ROOT}${VM_BASE}"/*; do
 		[[ -L "${target}" ]] && TARGETS+=( ${target##*/} )
 	done
 
@@ -181,7 +181,7 @@ set_symlink() {
 	fi
 	if [[ -z ${target} ]] ; then
 		die -q "Target \"${1}\" doesn't appear to be valid!"
-	elif [[ -d ${VM_BASE}/${target} ]] ; then
+	elif [[ -L ${ROOT}${VM_BASE}/${target} || -d ${ROOT}${VM_BASE}/${target} ]] ; then
 		local sym_dir=${symlink%/*}
 		mkdir -p "${sym_dir}" || die -q "Could not create ${sym_dir}"
 		ln -snf "${VM_BASE}/${target}" "${symlink}"


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2022-06-27 19:26 Florian Schmaus
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2022-06-27 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     94e7f0adb2044e6fae02a8d93384ad65c725755b
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 19:22:19 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 19:26:14 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=94e7f0ad

Fix paramter description for "eselect java-vm set"

The 'user' or 'system' arguments became optional with
a9fd19b87c15 ("Decide based on the UID if system or user VM should be
modified").

Fixes: a9fd19b87c15c4c573ab43b8547a26d6ea894ebc

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 src/modules/java-vm.eselect.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index d2fdd7a..8fac2a1 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -112,7 +112,7 @@ describe_set_options() {
 }
 
 describe_set_parameters() {
-	echo "<user|system> <VM>"
+	echo "[user|system] <VM>"
 }
 
 do_set() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2022-06-27  6:49 Florian Schmaus
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2022-06-27  6:49 UTC (permalink / raw
  To: gentoo-commits

commit:     78b919bb302830f94afce614cbc6cf8efcba749d
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 15:44:35 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 06:49:08 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=78b919bb

java-vm.eselect: remove trailing slash from VM_BASE

All uses of this variable already append a slash, which results in a
double slash when running 'eselect java-vm set'.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 src/modules/java-vm.eselect.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index 7c46ff1..d2fdd7a 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -6,7 +6,7 @@ DESCRIPTION="Manage the Java system and user VM"
 MAINTAINER="java@gentoo.org"
 VERSION="@VERSION@"
 
-VM_BASE="${EROOT}/usr/lib/jvm/"
+VM_BASE="${EROOT}/usr/lib/jvm"
 VM_SYSTEM="${EROOT}/etc/java-config-2/current-system-vm"
 VM_USER="${HOME}/.gentoo${EPREFIX}/java-config-2/current-user-vm"
 VM_CONFIG="${EROOT}/usr/share/java-config-2/vm"


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2018-01-03 22:51 James Le Cuirot
  0 siblings, 0 replies; 6+ messages in thread
From: James Le Cuirot @ 2018-01-03 22:51 UTC (permalink / raw
  To: gentoo-commits

commit:     3ef2719e5943d2d65d6e46f1d7fcdbf6f59f3933
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 20:59:35 2017 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 22:54:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=3ef2719e

Fix typo in java-vm module

 src/modules/java-vm.eselect.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index 917b4d0..13da3f1 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -112,7 +112,7 @@ do_set() {
 		if [[ -w $(dirname ${VM_SYSTEM}) ]]; then
 			my_set ${VM_SYSTEM} ${2}
 		else
-			die -q "Sorry, you don't have enough premission to set system"
+			die -q "Sorry, you don't have enough permission to set system"
 		fi
 	elif [[ ${1} == "user" ]]; then
 		if [[ ${UID} != 0 ]]; then 


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/eselect-java:master commit in: src/modules/
@ 2018-01-03 22:51 James Le Cuirot
  0 siblings, 0 replies; 6+ messages in thread
From: James Le Cuirot @ 2018-01-03 22:51 UTC (permalink / raw
  To: gentoo-commits

commit:     764d85b21d244a35f2e97474716f145045d0d596
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 30 23:00:10 2017 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 22:54:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=764d85b2

Modernise the java-vm module help text

 src/modules/java-vm.eselect.in | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in
index b8654e3..552062f 100644
--- a/src/modules/java-vm.eselect.in
+++ b/src/modules/java-vm.eselect.in
@@ -28,7 +28,11 @@ sym_to_vm() {
 ### show action ###
 
 describe_show() {
-	echo "Show the current vm"
+	echo "Show the current VM"
+}
+
+describe_show_parameters() {
+	echo "[user|system]"
 }
 
 do_show() {
@@ -100,15 +104,19 @@ do_list() {
 ### set action ###
 
 describe_set() {
-	echo "Set a new system or user vm"
+	echo "Set a new system or user VM"
 }
 
 describe_set_options() {
 	echo "--if-unset : do not change if already set"
 }
 
+describe_set_parameters() {
+	echo "<user|system> <VM>"
+}
+
 do_set() {
-	local usage="Usage [user|system] [vm]"
+	local usage="Usage <user|system> <VM>"
 	local ifunset=0
 
 	if [[ ${1} == "--if-unset" ]]; then
@@ -128,7 +136,7 @@ do_set() {
 		if [[ ${UID} != 0 ]]; then 
 			my_set "${VM_USER}" "${2}" ${ifunset}
 		else
-			die -q "Sorry, you cannot set a user vm as root. Set the system vm instead"
+			die -q "Sorry, you cannot set a user VM as root. Set the system VM instead"
 		fi
 	else
 		die -q ${usage}


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

end of thread, other threads:[~2024-04-20 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 10:33 [gentoo-commits] proj/eselect-java:master commit in: src/modules/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2024-04-20 11:28 Florian Schmaus
2022-06-27 19:26 Florian Schmaus
2022-06-27  6:49 Florian Schmaus
2018-01-03 22:51 James Le Cuirot
2018-01-03 22:51 James Le Cuirot

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