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 while.
Now I've found out that the new, migration-overlay is recommended:

https://projects.gentooexperimental.org/expj/wiki/
https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay

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:

/usr/local/overlays/migration-overlay/dev-java/sun-jdk/sun-jdk-1.4.2.10-r11.ebuild:\
 line 164: java_pkg_postinst: command not found

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


### Update the migration-overlay using SVN (
it needs to be checked out first)
# 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-1.4.2.10-r11.ebuild > sun-jdk-1.4.2.10-r12.ebuild
# ebuild sun-jdk-1.4.2.10-r12.ebuild digest

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

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

### Add required environment variables:
# grep PROVIDES files/sun-jdk-1.4 >> /etc/env.d/java/20sun- jdk-1.4.2.10
# grep BOOTCLASSPATH files/sun-jdk-1.4 >> /etc/env.d/java/20sun-jdk-1.4.2.10
# echo "GENERATION=2" >> /etc/env.d/java/20sun-jdk-1.4.2.10
# env-update && . /etc/profile
>>> Regenerating /etc/ld.so.cache...
 * === 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 https://projects.gentooexperimental.org/expj/wiki/ 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-1.4.2.10] "Sun JDK 1.4.2.10" (/etc/env.d/java/20sun-jdk-1.4.2.10) *
# java-config-2 -L
*) Sun JDK 1.4.2.10 [sun-jdk-1.4.2.10] (/etc/env.d/java/20sun-jdk-1.4.2.10)


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 (http://counter.li.org)