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
Message-Id: 254054bc0602070314o106c9e8aj@mail.gmail.com
1 Hello group!
2
3 During several last months I was testing axxo-overlay in hope to see what is
4 interesting in there. But the gentooexperimental outage stopped me for a
5 while.
6 Now I've found out that the new, migration-overlay is recommended:
7
8 https://projects.gentooexperimental.org/expj/wiki/
9 https://projects.gentooexperimental.org/expj/wiki/Using_migration-overlay
10
11 Anyway, I was trying for two straight days to switch to this overlay,
12 but without success. And today I've found the solution!
13 I thought that this may be beneficial to some users/testers, so below
14 I described roughly the steps that helped me overcome the dreadful warning
15 while emerging sun-jdk:
16
17 /usr/local/overlays/migration-overlay/dev-java/sun-jdk/sun-
18 jdk-1.4.2.10-r11.ebuild:\
19 line 164: java_pkg_postinst: command not found
20
21 and continuous recommendation to rebuild that package ad infinitum.
22 Here's what I did finally.
23
24
25 ### Update the migration-overlay using SVN (it needs to be checked out
26 first)
27 # svn up /usr/local/overlays/migration-overlay
28
29 ### Make sure that sun-jdk is unmasked:
30 # grep sun-jdk /etc/portage/package.keywords
31 =dev-java/sun-jdk-1.4* ~x86
32
33 ### Correct the ebuild: java_pkg_postinst --> java-vm-2_pkg_postinst
34 # cd /usr/local/overlays/migration-overlay/dev-java/sun-jdk
35 # sed 's/java_pkg_postinst/java-vm-2_pkg_postinst/'
36 sun-jdk-1.4.2.10-r11.ebuild > sun-jdk-1.4.2.10-r12.ebuild
37 # ebuild sun-jdk-1.4.2.10-r12.ebuild digest
38
39 ### Emerge Generation-1 JDK:
40 # emerge -av =sun-jdk-1.4.2.10*
41 # env-update && . /etc/profile
42
43 ### Emerge Generation-2 JDK:
44 # rm /etc/env.d/java/20sun-jdk-1.4.2.10
45 # emerge -av =sun-jdk-1.4.2.10*
46 # env-update && . /etc/profile
47
48 ### Add required environment variables:
49 # grep PROVIDES files/sun-jdk-1.4 >> /etc/env.d/java/20sun-jdk-1.4.2.10
50 # grep BOOTCLASSPATH files/sun-jdk-1.4 >> /etc/env.d/java/20sun-jdk-1.4.2.10
51 # echo "GENERATION=2" >> /etc/env.d/java/20sun-jdk-1.4.2.10
52 # env-update && . /etc/profile
53 >>> Regenerating /etc/ld.so.cache...
54 * === Java Environment Checker ===
55 * The purpose of this script is to check the sanity of your Java
56 Environment.
57
58 * We have significantly changed and improved the way Java is handled in
59 many respects.
60 * Please refer to https://projects.gentooexperimental.org/expj/wiki/ for
61 details
62
63
64 Performing the following checks: vm_environment_files user_settings
65 generation_1_system_vm
66
67 Checking vm_environment_files
68 Checking user_settings
69 * Running as root. Don't need to check user settings.
70 Checking generation_1_system_vm
71 * Java environment is sane. Congratulations!
72
73 ### Make sure everything is okay:
74 # java -version
75 java version "1.4.2_10"
76 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
77 Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)
78 # which java
79 /usr/bin/java
80 # java-config-1 -L
81 [sun-jdk-1.4.2.10] "Sun JDK 1.4.2.10" (/etc/env.d/java/20sun-jdk-1.4.2.10) *
82 # java-config-2 -L
83 *) Sun JDK 1.4.2.10 [sun-jdk-1.4.2.10] (/etc/env.d/java/20sun-jdk-1.4.2.10)
84
85
86 I guess that the small problems (java -> java-vm-2 renaming, missing
87 env vars) will be resolved soon. I hope to see more interesting things
88 in migration-overlay and finally in official portage tree. :-D
89
90 Friendly,
91 Wiktor Wandachowicz
92
93 --
94 Registered Linux user #390131 (http://counter.li.org)

Replies