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
On 9/15/08, Alon Bar-Lev <alon.barlev@×××××.com> wrote:
> > Well this is probably a flaw in portage then, but the solution is only > > a two-step emerge process: > > > > emerge gcj-jdk > > emerge icedtea6 > > > > I don't think that's inherently difficult. > > > You forgot: > java-config -S icedtea6 > emerge --unmerge gcj-jdk
And on a second thought... You need also add the gcj USE flag to gcc, reemerge gcc, then at the end remove the gcj USE flag from gcc and reemerge gcc. So it is much more complex. So basically, provided that >=gcc-4.3 is stable, this is the outline of what I thought, you can make it more efficient if you check for other valid jdks and not force only gcj... if installed icedtea6; then exit 0 fi if ! has_use gcc gcj; then should_remove_gcj_use_from_gcc=1 USE="gcj" emerge --oneshot gcc || die fi if ! installed gcj-jdk; then should_remove_gcj_jdk=1 emerge --oneshot gcj-jdk || die fi old_java=$(java-config -f) java-config -S gcj-jdk || die emerge icedtea6 || die if [ ${old_java}" = "gcj-jdk" -a -n "${should_remove_gcj_jdk}" ]; then java-config -S icedtea6 || die else java-config -S $(old_java) || die fi [ -n "${should_remove_gcj_jdk}" ] && emerge --unmerge gcj-jdk [ -n "${should_remove_gcj_use_from_gcc}" ] && emerge --oneshot gcc exit 0

Replies

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