From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FdWZW-00063O-DD for garchives@archives.gentoo.org; Tue, 09 May 2006 18:04:34 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k49I3bcn010602; Tue, 9 May 2006 18:03:37 GMT Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [195.113.24.4]) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k49I3abP015952 for ; Tue, 9 May 2006 18:03:36 GMT X-Envelope-From: cast3r@seznam.cz Received: from [195.113.27.33] (Caster@gehinom.kolej.mff.cuni.cz [195.113.27.33]) by smtp1.kolej.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k49I3ZlZ071821 for ; Tue, 9 May 2006 20:03:36 +0200 (CEST) (envelope-from cast3r@seznam.cz) Message-ID: <4460D977.8050908@seznam.cz> Date: Tue, 09 May 2006 20:03:35 +0200 From: Caster User-Agent: Thunderbird 1.5.0.2 (X11/20060502) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java Subject: Re: [gentoo-java] eselect java broken? References: <445C891A.5030008@ub.uu.se> <445DEFA1.30307@gentoo.org> <445F213A.4010503@ub.uu.se> <445FC6EB.3080705@seznam.cz> <445FE148.5060502@gentoo.org> <44607634.90607@seznam.cz> <44608ECB.1070904@gentoo.org> <44609437.50703@seznam.cz> <4460C81C.1060702@seznam.cz> <4460D212.402@seznam.cz> <4460D69B.4050903@gentoo.org> In-Reply-To: <4460D69B.4050903@gentoo.org> Content-Type: multipart/mixed; boundary="------------040805060002050206060103" X-Archives-Salt: 0c21f3a3-0f58-49df-896d-2c8482cc334b X-Archives-Hash: f349b463c83f562fc778f671fefb267e This is a multi-part message in MIME format. --------------040805060002050206060103 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------040805060002050206060103 Content-Type: text/plain; name="java.eselect.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="java.eselect.diff" --- 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 --------------040805060002050206060103-- -- gentoo-java@gentoo.org mailing list