public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Caster <cast3r@seznam.cz>
To: gentoo-java <gentoo-java@lists.gentoo.org>
Subject: Re: [gentoo-java] eselect java broken?
Date: Tue, 09 May 2006 20:03:35 +0200	[thread overview]
Message-ID: <4460D977.8050908@seznam.cz> (raw)
In-Reply-To: <4460D69B.4050903@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

Joshua Nichols wrote:
> You forgot to attach the patch :)
> 

Damn :) Here it is.

> But it's moot, since I just barely fixed it before seeing your message.
>> But then I've run into another problem. It allows root to set user-vm as
>> well as system-vm, while java-config-2 doesn't. java-config-2 then lists
>> it as active with java-config -L (probably causes other problems too).
>> There's no way to unset it but removing /root/.gentoo/java-config-2
>> So, eselect java shouldn't list or allow changing of user-vm for root.
>> Haven't tried to fix that.
>>
>>   
> Right you are. It should die now if you try to set a user vm as root.
> 
> On a related note, it seems that the eselect module sets stuff by hand,
> ie by creating symlinks and whatnot. I'm not sure if this was
> intentional, or if it should be using java-config to do this instead.
> 

Using java-config to set stuff would be easy. To list stuff, it would
need to parse its output. I'm not even sure if an user can determine
system-vm with java-config. Maybe use the python functions that
java-config uses?

> In any event, thanks for the report. This is exactly the stuff I want to
> be found and fixed before we merge the migration-overlay into the main
> tree.
> 

Glad to help :)

Caster

[-- Attachment #2: java.eselect.diff --]
[-- Type: text/plain, Size: 1051 bytes --]

--- java.eselect.2.0.22	2006-05-09 19:17:02.000000000 +0200
+++ java.eselect.fixed	2006-05-09 19:16:00.000000000 +0200
@@ -10,8 +10,8 @@
 VERSION=$(svn_date_to_version "${SVN_DATE}" )
 
 VM_BASE=/usr/lib/jvm/
-VM_SYSTEM=/etc/java-config/system-vm
-VM_USER=${HOME}/.gentoo/user-vm
+VM_SYSTEM=/etc/java-config-2/current-system-vm
+VM_USER=${HOME}/.gentoo/java-config-2/current-user-vm
 
 find_targets() {
 	local f
@@ -67,12 +67,14 @@
 		[[ -L ${VM_USER} ]] && user_name=$(sym_to_vm ${VM_USER})
 
 		for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
+			mark="";
 			if [[ ${targets[${i}]} == ${system_name} ]]; then
-				targets[${i}]="${targets[${i}]} $(highlight 'system-vm')"
+				mark="${mark} $(highlight 'system-vm')";
 			fi
-			if [[ ${targets[${i}]} == ${user_user} ]]; then
-				targets[${i}]="${targets[${i}]} $(highlight 'user-vm' )"
+			if [[ ${targets[${i}]} == ${user_name} ]]; then
+				mark="${mark} $(highlight 'user-vm')";
 			fi
+			targets[${i}]="${targets[${i}]} ${mark}"
 		done
 		write_numbered_list "${targets[@]}"
 	else

  reply	other threads:[~2006-05-09 18:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06 11:31 [gentoo-java] Feedback on migration and experimental overlay Uwe Klosa
2006-05-07 13:01 ` Joshua Nichols
2006-05-08 10:45   ` Uwe Klosa
2006-05-08 22:32     ` Caster
2006-05-09  0:24       ` Joshua Nichols
2006-05-09 11:00         ` Caster
2006-05-09 12:44           ` Joshua Nichols
2006-05-09 13:08             ` Caster
2006-05-09 16:49               ` [gentoo-java] eselect java broken? Caster
2006-05-09 17:30                 ` Joshua Nichols
2006-05-09 17:32                 ` Caster
2006-05-09 17:51                   ` Joshua Nichols
2006-05-09 18:03                     ` Caster [this message]
2006-05-10 13:05                       ` Caster
2006-05-10 13:14                         ` Joshua Nichols

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=4460D977.8050908@seznam.cz \
    --to=cast3r@seznam.cz \
    --cc=gentoo-java@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