1 |
Petteri Räty wrote: |
2 |
> Added some QA checks and changed java-pkg_announce-qa-violation to use |
3 |
> ewarn to make it show better. Any objections? Will commit sometimes next |
4 |
> week if there aren't any. |
5 |
> |
6 |
> Regards, |
7 |
> Petteri |
8 |
> |
9 |
> Index: java-utils-2.eclass |
10 |
> =================================================================== |
11 |
> RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v |
12 |
> retrieving revision 1.63 |
13 |
> diff -u -r1.63 java-utils-2.eclass |
14 |
> --- java-utils-2.eclass 3 Mar 2007 20:37:35 -0000 1.63 |
15 |
> +++ java-utils-2.eclass 3 Mar 2007 20:44:45 -0000 |
16 |
> @@ -205,6 +205,10 @@ |
17 |
> |
18 |
> java-pkg_check-phase install |
19 |
> |
20 |
> + if ! hasq source ${IUSE}; then |
21 |
> + java-pkg_announce-qa-violation "${FUNCNAME} called without source in IUSE" |
22 |
|
23 |
s/source/examples? |
24 |
|
25 |
> + fi |
26 |
> + |
27 |
> local dest=/usr/share/doc/${PF}/examples |
28 |
> if [[ ${#} = 1 && -d ${1} ]]; then |
29 |
> INSDESTTREE="${dest}" doins -r ${1}/* || die "Installing examples failed" |
30 |
> @@ -550,6 +554,10 @@ |
31 |
> |
32 |
> java-pkg_check-phase install |
33 |
> |
34 |
> + if ! hasq doc ${IUSE}; then |
35 |
> + java-pkg_announce-qa-violation "${FUNCNAME} called without doc in IUSE" |
36 |
> + fi |
37 |
> + |
38 |
> [[ -z "${dir}" ]] && die "Must specify a directory!" |
39 |
> [[ ! -d "${dir}" ]] && die "${dir} does not exist, or isn't a directory!" |
40 |
> |
41 |
> @@ -586,8 +594,9 @@ |
42 |
> debug-print-function ${FUNCNAME} $* |
43 |
> |
44 |
> [ ${#} -lt 1 ] && die "At least one argument needed" |
45 |
> + |
46 |
> if ! hasq source ${IUSE}; then |
47 |
> - echo "Java QA Notice: ${FUNCNAME} called without source in IUSE" |
48 |
> + java-pkg_announce-qa-violation "${FUNCNAME} called without source in IUSE" |
49 |
> fi |
50 |
> |
51 |
> java-pkg_check-phase install |
52 |
> @@ -2323,7 +2332,7 @@ |
53 |
> |
54 |
> java-pkg_announce-qa-violation() { |
55 |
> if is-java-strict; then |
56 |
> - echo "Java QA Notice: $@" >&2 |
57 |
> + ewarn "Java QA Notice: $@" |
58 |
> increment-qa-violations |
59 |
> fi |
60 |
> } |
61 |
|
62 |
Also, when it checks foo is in IUSE, why not check "use foo" as well? |
63 |
Heck, why don't even change the functions so they only perform their |
64 |
stuff when "use foo" holds (this way you get a free QA check for IUSE |
65 |
right in useq()), and get rid of the "use foo && java-pkg_dofoo" idiom? |
66 |
:) If we agree we *ALWAYS* want to install this javadocs/source/ always |
67 |
based on flags (maybe there could be some nocheck variants if needed). |
68 |
|
69 |
Or what's the reasoning behind these checks? If you do a "use doc && |
70 |
java_pkg-dojavadoc" without doc in IUSE, you will already get warned by |
71 |
usev(). If you omit the "use doc", then how does it matter that doc is |
72 |
or isn't in IUSE? |
73 |
|
74 |
-- |
75 |
Vlastimil Babka (Caster) |
76 |
Gentoo/Java |
77 |
-- |
78 |
gentoo-java@g.o mailing list |