1 |
> |
2 |
> You can't test FEATURES in an ebuild. It's portage-specific. |
3 |
> |
4 |
|
5 |
To 1) try and turn this thread into something a little more constructive |
6 |
and a little less childish; and 2) help improve the tree. I present one |
7 |
of the offending ebuilds dev-java/commons-io |
8 |
|
9 |
Without posting the whole file here it is |
10 |
|
11 |
src_test() { |
12 |
if has userpriv ${FEATURES}; then |
13 |
ANT_OPTS="-Djava.io.tmpdir=${T} -Duser.home=${T}" \ |
14 |
ANT_TASKS="ant-junit" \ |
15 |
eant test \ |
16 |
-Dgentoo.classpath="$(java-pkg_getjars junit)" \ |
17 |
-Dlibdir="libdir" \ |
18 |
-Djava.io.tmpdir="${T}" |
19 |
else |
20 |
elog "Tests fail unless userpriv is enabled because they |
21 |
test for" |
22 |
elog "file permissions which doesn't work when run as root." |
23 |
fi |
24 |
} |
25 |
|
26 |
I would assume it would be better to directly test whether the user is |
27 |
root, than test that userpriv is set? |
28 |
|
29 |
Alistair |