1 |
Hi, |
2 |
|
3 |
I would really like a way to echo more information when a die happens so |
4 |
the users can paste it in their bug report |
5 |
|
6 |
Only needs a very simple change to ebuild.sh: |
7 |
|
8 |
--- ebuild.sh.orig 2005-10-04 12:22:38.000000000 +0200 |
9 |
+++ ebuild.sh 2005-10-04 12:26:45.000000000 +0200 |
10 |
@@ -280,6 +280,8 @@ |
11 |
return 0 |
12 |
} |
13 |
+ |
14 |
+extra_die() { :; } |
15 |
+ |
16 |
diefunc() { |
17 |
local funcname="$1" lineno="$2" exitcode="$3" |
18 |
shift 3 |
19 |
@@ -289,6 +291,7 @@ |
20 |
echo "!!! ${*:-(no error message)}" >&2 |
21 |
echo "!!! If you need support, post the topmost build error, NOT this status message." >&2 |
22 |
echo >&2 |
23 |
+ extra_die |
24 |
exit 1 |
25 |
} |
26 |
|
27 |
then in your eclass you can simply go, for example: |
28 |
extra_die() { |
29 |
echo "!!! If you file a bug report, please include the following information:" >&2 |
30 |
echo "CLASSPATH: ${CLASSPATH}" >&2 |
31 |
echo "JAVA_HOME: ${JAVA_HOME}" >&2 |
32 |
blabla |
33 |
echo "and offcourse output of emerge --info" >&2 |
34 |
} |
35 |
|
36 |
can only think about 2 real problems at the moment: circular dies which shouldn't be that hard to avoid using common sense and when multiple eclass define it and are inheritted it'll only show one |
37 |
-- |
38 |
gentoo-portage-dev@g.o mailing list |