Gentoo Archives: gentoo-java

From: Alon Bar-Lev <alon.barlev@×××××.com>
To: Andrew John Hughes <gnu_andrew@××××××××××.org>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] icedtea6 bootstrap
Date: Mon, 15 Sep 2008 05:08:20
Message-Id: 9e0cf0bf0809142208g2140ffc4kc205e0e069e58884@mail.gmail.com
In Reply to: Re: [gentoo-java] icedtea6 bootstrap by Alon Bar-Lev
1 On 9/15/08, Alon Bar-Lev <alon.barlev@×××××.com> wrote:
2 > > Well this is probably a flaw in portage then, but the solution is only
3 > > a two-step emerge process:
4 > >
5 > > emerge gcj-jdk
6 > > emerge icedtea6
7 > >
8 > > I don't think that's inherently difficult.
9 >
10 >
11 > You forgot:
12 > java-config -S icedtea6
13 > emerge --unmerge gcj-jdk
14
15 And on a second thought... You need also add the gcj USE flag to gcc,
16 reemerge gcc, then at the end remove the gcj USE flag from gcc and
17 reemerge gcc.
18
19 So it is much more complex.
20
21 So basically, provided that >=gcc-4.3 is stable, this is the outline
22 of what I thought, you can make it more efficient if you check for
23 other valid jdks and not force only gcj...
24
25 if installed icedtea6; then
26 exit 0
27 fi
28 if ! has_use gcc gcj; then
29 should_remove_gcj_use_from_gcc=1
30 USE="gcj" emerge --oneshot gcc || die
31 fi
32 if ! installed gcj-jdk; then
33 should_remove_gcj_jdk=1
34 emerge --oneshot gcj-jdk || die
35 fi
36 old_java=$(java-config -f)
37 java-config -S gcj-jdk || die
38 emerge icedtea6 || die
39 if [ ${old_java}" = "gcj-jdk" -a -n "${should_remove_gcj_jdk}" ]; then
40 java-config -S icedtea6 || die
41 else
42 java-config -S $(old_java) || die
43 fi
44 [ -n "${should_remove_gcj_jdk}" ] && emerge --unmerge gcj-jdk
45 [ -n "${should_remove_gcj_use_from_gcc}" ] && emerge --oneshot gcc
46
47 exit 0

Replies

Subject Author
Re: [gentoo-java] icedtea6 bootstrap Andrew Cowie <andrew@×××××××××××××××××××.com>