public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ivan Yosifov <ivan@yosifov.net>
To: gentoo-java@lists.gentoo.org
Cc: Joshua Nichols <nichoj@gentoo.org>
Subject: Re: [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected
Date: Tue, 2 May 2006 21:01:45 +0300	[thread overview]
Message-ID: <200605022101.46157.ivan@yosifov.net> (raw)
In-Reply-To: <4456D7B9.6060408@gentoo.org>

Ok...

I updated migration overlay to revision 2153. Reemerged and updated both 
java-config and java-config-wrapper. I now have java-config 2.0.22 and 
1.3.0-r2 installed, java-config-wrapper is 0.8-r2. /usr/bin/java-config is:

#!/bin/bash

WANT_JAVA_CONFIG=${WANT_JAVA_CONFIG:="2"}

JAVA_CONFIG="/usr/bin/java-config-${WANT_JAVA_CONFIG}"

if [[ -x ${JAVA_CONFIG} ]]; then
        exec ${JAVA_CONFIG} "$@"
else
        echo "ERROR: Expected to find ${JAVA_CONFIG}"

While emerging eclipse I (still) get:

home ~ # emerge -1 eclipse-sdk
Calculating dependencies... done!
>>> Emerging (1 of 1) dev-util/eclipse-sdk-3.1.2-r2 to /
>>> checking ebuild checksums
>>> checking auxfile checksums
>>> checking miscfile checksums
>>> checking distfiles checksums
 * Checking for at least 768MBytes RAM ...                                                                            
[ ok ]
true
 * Found offending option -fomit-frame-pointer in your CFLAGS

 * One or more potentially gruesome CFLAGS detected. When you run into 
trouble,
 * please edit /etc/make.conf and remove all offending flags, then recompile
 * Eclipse and all its dependencies before submitting a bug report.

 * In particular, gtk+ is extremely sensitive to which which flags it was
 * compiled with.

 * Tip: use equery depgraph "=eclipse-sdk-3.1.2-r2" to list all dependencies.

Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
Detected a JDK < 1.5.0
Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
Detected a JDK >= 1.4.2
>>> Unpacking source...

The env file seems to come from dev-java/sun-j2ee-1.3.1-r3 but that should be 
an unrelated problem. Please correct me if I am wrong but line 91 of 
java-utils.eclass:

local vm_patch=$(echo ${vm_version} | cut -d. -f3)

_really_ expects a 3-component vm_version, like 1.2.3. And here java-config -f 
returns sun-jdk-1.5, that means a 2-component version "1.5". I described that 
my last mail and still feel this is the issue at least in my case.

Am Dienstag, 2. Mai 2006 06:53 schrieb Joshua Nichols:
> I found the root of the problem. java-config-wrapper was installing
> /usr/bin/java-config. This is basically a wrapper, as the name suggests.
> java-config-1 was installing /usr/bin/java-config-1. This was the old
> school java-config. java-config-2 was installing /usr/bin/java-config-2
> .... AND installing the same thing to /usr/bin/java-config. A bit of an
> oversight on my part, so my apologies for the inconvenience.
>
> To fix this, I've bumped to java-config-2.0.22 and
> java-config-wrapper-0.8-r2. Please update to these versions. I can't
> stress how important it is keep everything in the overlay up to date,
> because packages will be bumped as bugs are found and fixed.
>
> Regardes,
>
> Josh
>
> Mathew Robertson wrote:
> > I was also having similar problems yesterday, as I had just done a
> > system update.  re-emerging the java-config-wrapper has solved most of
> > them - thanks for the tip.
> >
> > Mathew Robertson
> >
> > Joshua Nichols wrote:
> >> Ivan Yosifov wrote:
> >>> Am Donnerstag, 20. April 2006 19:03 schrieb Ivan Yosifov:
> >>>> Am Mittwoch, 19. April 2006 18:15 schrieb Joshua Nichols:
> >>>>> Ivan Yosifov wrote:
> >>>>>> Am Dienstag, 18. April 2006 19:36 schrieb Joshua Nichols:
> >>>>>>> Ivan Yosifov wrote:
> >>>>>>>> Hello,
> >>>>>>>>
> >>>>>>>> Happens while emergeing eclipse:
> >>>>>>>>
> >>>>>>>> home ~ # emerge -1 eclipse-sdk
> >>>>>>>> Calculating dependencies... done!
> >>>>>>>>
> >>>>>>>>>>> Emerging (1 of 1) dev-util/eclipse-sdk-3.1.2 to /
> >>>>>>>>>>> checksums files ....
> >>>>>>>>>>> checksums src_uri ;-) eclipse-sourceBuild-srcIncluded-3.1.2.zip
> >>>>>>>>
> >>>>>>>>  * Checking for sufficient physical RAM
> >>>>>>>>  * Checking for bad CFLAGS
> >>>>>>>>  * Found offending option -fomit-frame-pointer in your CFLAGS
> >>>>>>>> ....
> >>>>>>>>  * Tip: use equery depgraph "=eclipse-sdk-3.1.2" to list all
> >>>>>>>> dependencies.
> >>>>>>>>
> >>>>>>>> /usr/local/portage/migration/migration/eclass/java-utils.eclass:
> >>>>>>>> line
> >>>>>>>> 97: [: -ge: unary operator expected
> >>>>>>>> Detected a JDK < 1.5.0
> >>>>>>>> Detected a JDK >= 1.4.2
> >>>>>>>>
> >>>>>>>>>>> Unpacking source...
> >>>>>>>>
> >>>>>>>> /usr/local/portage/migration/migration/ is where I've put the
> >>>>>>>> migration overlay revision 2114. Bash is 3.1_p17. Is this an
> >>>>>>>> eclass
> >>>>>>>> bug or something else ?
> >>>>>>>
> >>>>>>> Something else, I think. I've been working on the eclipse ebuilds
> >>>>>>> (while using migration-overlay, obviously), and hadn't noticed any
> >>>>>>> problems.
> >>>>>>>
> >>>>>>> It might have something to do with the ebuild itself. Someone
> >>>>>>> went and
> >>>>>>> committed a bump to 3.1.2 without consulting with us Java folks, so
> >>>>>>> I'm not sure what condition it is. Expect to see a new revision
> >>>>>>> in a
> >>>>>>> day or so...
> >>>>>>>
> >>>>>>> Josh
> >>>>>>
> >>>>>> I am getting the same with the new eclipse-sdk-3.1.2-r1. I added
> >>>>>> some
> >>>>>> debugging output to the eclass in java-utils_is-vm-version-ge():
> >>>>>>
> >>>>>> --- ./java-utils.eclass 2006-04-19 10:58:43.000000000 +0300
> >>>>>> +++ /usr/local/portage/migration/migration/eclass/java-utils.eclass
> >>>>>> 2006-04-19 11:00:25.000000000 +0300
> >>>>>> @@ -91,6 +91,12 @@
> >>>>>>         local vm_patch=$(echo ${vm_version} | cut -d. -f3)
> >>>>>>         local vm_extra=$(echo ${vm_version} | cut -d. -f4)
> >>>>>>
> >>>>>> +       echo ${vm_major}
> >>>>>> +       echo ${vm_minor}
> >>>>>> +       echo ${user_major}
> >>>>>> +       echo ${user_minor}
> >>>>>> +       echo ${vm_patch}
> >>>>>> +       echo ${user_patch}
> >>>>>>         if [ ${vm_major} -ge ${user_major} ] && [ ${vm_minor} -gt
> >>>>>> ${user_minor} ] ; then
> >>>>>>                 echo "Detected a JDK >= ${user_version}"
> >>>>>>                 return 0
> >>>>>>
> >>>>>> and the output is:
> >>>>>>
> >>>>>>  * Tip: use equery depgraph "=eclipse-sdk-3.1.2-r1" to list all
> >>>>>> dependencies.
> >>>>>>
> >>>>>> 1
> >>>>>> 5
> >>>>>> 1
> >>>>>> 5
> >>>>>>
> >>>>>> 0
> >>>>>> /usr/local/portage/migration/migration/eclass/java-utils.eclass:
> >>>>>> line
> >>>>>> 103: [: -ge: unary operator expected
> >>>>>> Detected a JDK < 1.5.0
> >>>>>> 1
> >>>>>> 5
> >>>>>> 1
> >>>>>> 4
> >>>>>>
> >>>>>> 2
> >>>>>> Detected a JDK >= 1.4.2
> >>>>>>
> >>>>>>>>> Unpacking source...
> >>>>>>
> >>>>>> ,meaning that vm_patch is ending up empty and that seems to
> >>>>>> confuse -ge
> >>>>>> conditionals using it.
> >>>>>
> >>>>> I'll have to look into this, but it probably just needs to sanity
> >>>>> checking for the vm_extra and company.
> >>>>>
> >>>>> Aside from that, what is the original of the ebuild for eclipse
> >>>>> that you
> >>>>> are using?  Also, which VM are you using? I haven't been able to
> >>>>> quite
> >>>>> reproduce this problem...
> >>>>>
> >>>>> Josh
> >>>>
> >>>> I am using the eclipse-sdk-3.1.2-r1 ebuild from the main tree,
> >>>> attached
> >>>> here for reference. I have sun-jdk 1.4.2.10-r13 and 1.5.0.06-r13
> >>>> installed.
> >>>> The problem with vm_patch seems to be that
> >>>>
> >>>> java-config -f | sed -e "s/.*-\([0-9.]\+\).*/\1/" ( in
> >>>> java-utils_get-vm-version )
> >>>>
> >>>> returns just "1.5" and so
> >>>>
> >>>> vm_patch=$(echo ${vm_version} | cut -d. -f3) ( in
> >>>> java-utils_is-vm-version-ge ) ends up being an empty string. There
> >>>> is no
> >>>> third field to cut.
> >>>
> >>> Still an issue with eclipse-sdk-3.1.2-r2 and migration overlay
> >>> revision 2129.
> >>
> >> Could you check the contents of /usr/bin/java-config ? If it is a
> >> python script, try remerging java-config-wrapper.
> >>
> >> I just finished helping a user in #gentoo-java that was having the
> >> same issue, and that did the trick.
> >>
> >> Now, I need to track down why it's the original java-config, instead
> >> of the new wrapper for java-config....
> >>
> >> - Josh

-- 
Cheers,
Ivan Yosifov.
-- 
gentoo-java@gentoo.org mailing list



  parent reply	other threads:[~2006-05-02 18:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18 12:31 [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected Ivan Yosifov
2006-04-18 16:36 ` Joshua Nichols
2006-04-19  8:08   ` Ivan Yosifov
2006-04-19 15:15     ` Joshua Nichols
2006-04-20 16:03       ` Ivan Yosifov
2006-04-25 12:18         ` Ivan Yosifov
2006-05-01 21:19           ` Joshua Nichols
2006-05-01 23:45             ` Mathew Robertson
2006-05-02  3:53               ` Joshua Nichols
2006-05-02  4:19                 ` [gentoo-java] OT: eclipse auto-indent Mathew Robertson
2006-05-02  4:48                   ` Qian Qiao
2006-05-02  4:50                     ` Mathew Robertson
2006-05-02 18:01                 ` Ivan Yosifov [this message]
2006-05-02 18:29                   ` [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected 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=200605022101.46157.ivan@yosifov.net \
    --to=ivan@yosifov.net \
    --cc=gentoo-java@lists.gentoo.org \
    --cc=nichoj@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