Gentoo Archives: gentoo-java

From: Joshua Nichols <nichoj@g.o>
To: Ivan Yosifov <ivan@×××××××.net>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected
Date: Wed, 19 Apr 2006 15:17:26
Message-Id: 44465419.3010503@gentoo.org
In Reply to: Re: [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected by Ivan Yosifov
1 Ivan Yosifov wrote:
2 > Am Dienstag, 18. April 2006 19:36 schrieb Joshua Nichols:
3 >
4 >> Ivan Yosifov wrote:
5 >>
6 >>> Hello,
7 >>>
8 >>> Happens while emergeing eclipse:
9 >>>
10 >>> home ~ # emerge -1 eclipse-sdk
11 >>> Calculating dependencies... done!
12 >>>
13 >>>
14 >>>>>> Emerging (1 of 1) dev-util/eclipse-sdk-3.1.2 to /
15 >>>>>> checksums files ....
16 >>>>>> checksums src_uri ;-) eclipse-sourceBuild-srcIncluded-3.1.2.zip
17 >>>>>>
18 >>> * Checking for sufficient physical RAM
19 >>> * Checking for bad CFLAGS
20 >>> * Found offending option -fomit-frame-pointer in your CFLAGS
21 >>> ....
22 >>> * Tip: use equery depgraph "=eclipse-sdk-3.1.2" to list all
23 >>> dependencies.
24 >>>
25 >>> /usr/local/portage/migration/migration/eclass/java-utils.eclass: line 97:
26 >>> [: -ge: unary operator expected
27 >>> Detected a JDK < 1.5.0
28 >>> Detected a JDK >= 1.4.2
29 >>>
30 >>>
31 >>>>>> Unpacking source...
32 >>>>>>
33 >>> /usr/local/portage/migration/migration/ is where I've put the migration
34 >>> overlay revision 2114. Bash is 3.1_p17. Is this an eclass bug or
35 >>> something else ?
36 >>>
37 >> Something else, I think. I've been working on the eclipse ebuilds (while
38 >> using migration-overlay, obviously), and hadn't noticed any problems.
39 >>
40 >> It might have something to do with the ebuild itself. Someone went and
41 >> committed a bump to 3.1.2 without consulting with us Java folks, so I'm
42 >> not sure what condition it is. Expect to see a new revision in a day or
43 >> so...
44 >>
45 >> Josh
46 >>
47 >
48 > I am getting the same with the new eclipse-sdk-3.1.2-r1. I added some
49 > debugging output to the eclass in java-utils_is-vm-version-ge():
50 >
51 > --- ./java-utils.eclass 2006-04-19 10:58:43.000000000 +0300
52 > +++ /usr/local/portage/migration/migration/eclass/java-utils.eclass
53 > 2006-04-19 11:00:25.000000000 +0300
54 > @@ -91,6 +91,12 @@
55 > local vm_patch=$(echo ${vm_version} | cut -d. -f3)
56 > local vm_extra=$(echo ${vm_version} | cut -d. -f4)
57 >
58 > + echo ${vm_major}
59 > + echo ${vm_minor}
60 > + echo ${user_major}
61 > + echo ${user_minor}
62 > + echo ${vm_patch}
63 > + echo ${user_patch}
64 > if [ ${vm_major} -ge ${user_major} ] && [ ${vm_minor} -gt
65 > ${user_minor} ] ; then
66 > echo "Detected a JDK >= ${user_version}"
67 > return 0
68 >
69 > and the output is:
70 >
71 > * Tip: use equery depgraph "=eclipse-sdk-3.1.2-r1" to list all dependencies.
72 >
73 > 1
74 > 5
75 > 1
76 > 5
77 >
78 > 0
79 > /usr/local/portage/migration/migration/eclass/java-utils.eclass: line 103:
80 > [: -ge: unary operator expected
81 > Detected a JDK < 1.5.0
82 > 1
83 > 5
84 > 1
85 > 4
86 >
87 > 2
88 > Detected a JDK >= 1.4.2
89 >
90 >>>> Unpacking source...
91 >>>>
92 >
93 > ,meaning that vm_patch is ending up empty and that seems to confuse -ge
94 > conditionals using it.
95 >
96 >
97 I'll have to look into this, but it probably just needs to sanity
98 checking for the vm_extra and company.
99
100 Aside from that, what is the original of the ebuild for eclipse that you
101 are using? Also, which VM are you using? I haven't been able to quite
102 reproduce this problem...
103
104 Josh
105 --
106 gentoo-java@g.o mailing list

Replies