Gentoo Archives: gentoo-java

From: Wiktor Wandachowicz <siryes@×××××.com>
To: gentoo-java@l.g.o
Subject: [gentoo-java] migration-overlay take three
Date: Tue, 07 Feb 2006 11:15:18
Hello group!

During several last months I was testing axxo-overlay in hope to see what is
interesting in there. But the gentooexperimental outage stopped me for a
Now I've found out that the new, migration-overlay is recommended:

Anyway, I was trying for two straight days to switch to this overlay,
but without success. And today I've found the solution!
I thought that this may be beneficial to some users/testers, so below
I described roughly the steps that helped me overcome the dreadful warning
while emerging sun-jdk:

 line 164: java_pkg_postinst: command not found

and continuous recommendation to rebuild that package ad infinitum.
Here's what I did finally.

### Update the migration-overlay using SVN (it needs to be checked out
# svn up /usr/local/overlays/migration-overlay

### Make sure that sun-jdk is unmasked:
# grep sun-jdk /etc/portage/package.keywords
=dev-java/sun-jdk-1.4* ~x86

### Correct the ebuild: java_pkg_postinst --> java-vm-2_pkg_postinst
# cd /usr/local/overlays/migration-overlay/dev-java/sun-jdk
# sed 's/java_pkg_postinst/java-vm-2_pkg_postinst/'
sun-jdk- > sun-jdk-
# ebuild sun-jdk- digest

### Emerge Generation-1 JDK:
# emerge -av =sun-jdk-*
# env-update && . /etc/profile

### Emerge Generation-2 JDK:
# rm /etc/env.d/java/20sun-jdk-
# emerge -av =sun-jdk-*
# env-update && . /etc/profile

### Add required environment variables:
# grep PROVIDES files/sun-jdk-1.4 >> /etc/env.d/java/20sun-jdk-
# grep BOOTCLASSPATH files/sun-jdk-1.4 >> /etc/env.d/java/20sun-jdk-
# echo "GENERATION=2" >> /etc/env.d/java/20sun-jdk-
# env-update && . /etc/profile
>>> Regenerating /etc/
* === Java Environment Checker === * The purpose of this script is to check the sanity of your Java Environment. * We have significantly changed and improved the way Java is handled in many respects. * Please refer to for details Performing the following checks: vm_environment_files user_settings generation_1_system_vm Checking vm_environment_files Checking user_settings * Running as root. Don't need to check user settings. Checking generation_1_system_vm * Java environment is sane. Congratulations! ### Make sure everything is okay: # java -version java version "1.4.2_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode) # which java /usr/bin/java # java-config-1 -L [sun-jdk-] "Sun JDK" (/etc/env.d/java/20sun-jdk- * # java-config-2 -L *) Sun JDK [sun-jdk-] (/etc/env.d/java/20sun-jdk- I guess that the small problems (java -> java-vm-2 renaming, missing env vars) will be resolved soon. I hope to see more interesting things in migration-overlay and finally in official portage tree. :-D Friendly, Wiktor Wandachowicz -- Registered Linux user #390131 (