1 |
Hey folks, |
2 |
|
3 |
So, we have a bash script to help people rebuild packages on their |
4 |
system that were built with Java 1.5. It does help a bit, but it could |
5 |
definitely could use a little work. People often ask how they can help |
6 |
out, so I figure it may be a good thing to announce the need for |
7 |
improving this script. |
8 |
|
9 |
Here's a brief synopsis of what it does: |
10 |
* gets a list of all jars, using the pattern /usr/share/*/lib/*.jar |
11 |
* uses a python script, class-version-verify.py to check what version |
12 |
bytecode for each jar |
13 |
* makes a list of offending jars |
14 |
* uses qfile from app-portage/portage-utils to determine what package |
15 |
it belongs to |
16 |
* attempts to emerge all the offending packages |
17 |
|
18 |
Here are some problems with the current script: |
19 |
* Things that are brought onto the classpath for /usr/bin/ant cause |
20 |
some big trouble. This is because 1.5 bytecode is brought onto the |
21 |
classpath when you're trying to build 1.4 bytecode. |
22 |
* It's not smart enough to emerge stuff in order. As a result, we just |
23 |
attempt to merge them in a pseudo random order. If a package fails, we |
24 |
keep track of it to try in another 'run'. If the same packages keep |
25 |
failing 3 times, the script dies. |
26 |
* Some things could be installing jars somewhere beside |
27 |
/usr/share/*/lib/*.jar (in particular, to /opt) |
28 |
* Some binary packages install jars with 1.5 bytecode. These would be |
29 |
false positive. |
30 |
|
31 |
Some corresponding suggestions of how to handle the problems: |
32 |
* Check ant dependencies first. If there are offending packages, unmerge |
33 |
those, then remerge |
34 |
* Try unmerging stuff first. This way, emerge will figure out what order |
35 |
to put things in |
36 |
* try parsing CLASSPATH out of /usr/share/*/package.env to get a list of |
37 |
jars that get installed |
38 |
* have a variable with a list of known 1.5 jars. ignore the jar if it's |
39 |
in this list. |
40 |
|
41 |
|
42 |
The source for this is in subversion at: |
43 |
https://svn.gentooexperimental.org/svn/java/java-config-wrapper/trunk/ |
44 |
(under src/shell) |
45 |
|
46 |
So if this sounds up your ally, give it a shot. Hope to hear from someone :) |
47 |
|
48 |
Regards, |
49 |
- Josh |
50 |
-- |
51 |
gentoo-java@g.o mailing list |