Gentoo Archives: gentoo-java

From: Vlastimil Babka <caster@g.o>
To: gentoo-java@l.g.o
Subject: [gentoo-java] new proposed enhancement to java-pkg_jarfrom()
Date: Thu, 25 Jan 2007 10:32:41
Message-Id: 45B88710.2080405@gentoo.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Attached a patch, will commit if no-one objects.
5
6 Originally I just wanted to fix a bug that in src_test() it would shift
7 parameters (i.e. name of package) if the first parameter wasn't
8 - --build-only. Encountered this while improving commons-cli ebuild. Then
9 I decided to improve a bit more:
10
11 Fixes a theoretical situation where --build-only and --with-dependencies
12 would be both specified, but in the wrong order. Now there's a general
13 loop for resolving --* parameters.
14 Adds a new parameter: '--into $dir' which will symlink the jars into the
15 $dir instead of '.'
16 Consider this difference (again, commons-cli):
17
18 before the change:
19 src_test() {
20 cd lib
21 java-pkg_jar-from junit
22 cd ..
23 eant test
24 }
25
26
27 after the change:
28 src_test() {
29 java-pkg_jar-from --into lib junit
30 eant test
31 }
32
33 The directory must exist, but maybe it could be improved even more to
34 mkdir it if it doesn't?
35
36 BTW, I think deferring the test-specific jar-from/getjars calls until
37 src_test() is good idea, because you don't need to prefix them with "use
38 test &&", specify "--build-only" and you don't need to test package
39 twice (without and with test) to ensure those deps are really needed
40 only for testing.
41 - --
42 Vlastimil Babka (Caster)
43 Gentoo/Java
44 -----BEGIN PGP SIGNATURE-----
45 Version: GnuPG v1.4.6 (GNU/Linux)
46 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
47
48 iD8DBQFFuIcPtbrAj05h3oQRAlFAAKCcqFsMsQzy77Do8pQfzoi9Kbws0QCeIEKV
49 wwMC9H8jBvysTsObWpGg8V0=
50 =WMKt
51 -----END PGP SIGNATURE-----

Attachments

File name MIME type
java-utils-2.eclass.patch text/x-patch

Replies