Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: Thomas Matthijs <axxo@g.o>
Subject: allow extra info to be echod on die
Date: Wed, 5 Oct 2005 16:33:17 +0000
Hi,

I would really like a way to echo more information when a die happens so
the users can paste it in their bug report

Only needs a very simple change to ebuild.sh:

--- ebuild.sh.orig      2005-10-04 12:22:38.000000000 +0200
+++ ebuild.sh   2005-10-04 12:26:45.000000000 +0200
@@ -280,6 +280,8 @@
        return 0
 }
+
+extra_die() { :; }
+
 diefunc() {
        local funcname="$1" lineno="$2" exitcode="$3"
        shift 3
@@ -289,6 +291,7 @@
        echo "!!! ${*:-(no error message)}" >&2
        echo "!!! If you need support, post the topmost build error, NOT this status message." >&2
        echo >&2
+       extra_die
        exit 1
 }

then in your eclass you can simply go, for example:
extra_die() {
        echo "!!! If you file a bug report, please include the following information:" >&2
        echo "CLASSPATH: ${CLASSPATH}" >&2
        echo "JAVA_HOME: ${JAVA_HOME}" >&2
	blabla
        echo "and offcourse output of emerge --info" >&2
}

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
-- 
gentoo-portage-dev@g.o mailing list


Replies:
Re: allow extra info to be echod on die
-- Brian Harring
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PATCH] bug 107770 ebuild screwing up A when executing phase by phase
Next by thread:
Re: allow extra info to be echod on die
Previous by date:
Re: [PATCH] bug 107770 ebuild screwing up A when executing phase by phase
Next by date:
Re: allow extra info to be echod on die


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.