public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die
       [not found] ` <20051005164801.GC7855@nightcrawler>
@ 2005-10-05 18:47   ` Brian Harring
  2005-10-05 18:55     ` Daniel Ostrow
  2005-10-05 19:04     ` Aron Griffis
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Harring @ 2005-10-05 18:47 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

Just an addendum to this... it went in, will be available in 
2.0.51_rc4 and up.

If you want all registered death funcs to kick in,

EBUILD_DEATH_HOOKS="$EBUILD_DEATH_HOOKS the_name_of_your_func"

or if you want just your func to run

EBUILD_DEATH_HOOKS="the_name_of_your_func"

CC'ing gentoo-dev, since I'd expect some devs would be interested in 
it.
~harring

On Wed, Oct 05, 2005 at 11:48:01AM -0500, Brian Harring wrote:
> On Wed, Oct 05, 2005 at 04:33:17PM +0000, Thomas Matthijs wrote:
> > 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_DEATH_HOOKS=''
> 
>  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
> +	for x in $EBUILD_DEATH_HOOKS; do
> +		${x} "$1" "$2" "$3"
> +       done
>         exit 1
>  }
> ^^^ something like that I think is a bit better; passing the diefunc 
> args to the hooks also.
> ~harring



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die
  2005-10-05 18:47   ` [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die Brian Harring
@ 2005-10-05 18:55     ` Daniel Ostrow
  2005-10-05 19:04     ` Aron Griffis
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Ostrow @ 2005-10-05 18:55 UTC (permalink / raw
  To: gentoo-dev; +Cc: gentoo-portage-dev

On Wed, 2005-10-05 at 13:47 -0500, Brian Harring wrote:
> 2.0.51_rc4

And by 2.0.51_rc4 he really meant 2.0.53_rc4. :)

-- 
Daniel Ostrow
Gentoo Foundation Board of Trustees
Gentoo/{PPC,PPC64,DevRel}
dostrow@gentoo.org

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die
  2005-10-05 18:47   ` [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die Brian Harring
  2005-10-05 18:55     ` Daniel Ostrow
@ 2005-10-05 19:04     ` Aron Griffis
  2005-10-05 19:14       ` Brian Harring
  1 sibling, 1 reply; 4+ messages in thread
From: Aron Griffis @ 2005-10-05 19:04 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Brian Harring wrote:	[Wed Oct 05 2005, 02:47:09PM EDT]
> >  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
> > +	for x in $EBUILD_DEATH_HOOKS; do
> > +		${x} "$1" "$2" "$3"
> > +       done
> >         exit 1
> >  }

Is this exactly what went in?  It looks like you're trying to use
positional params that were shifted earlier.

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die
  2005-10-05 19:04     ` Aron Griffis
@ 2005-10-05 19:14       ` Brian Harring
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Harring @ 2005-10-05 19:14 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

On Wed, Oct 05, 2005 at 03:04:23PM -0400, Aron Griffis wrote:
> Brian Harring wrote:	[Wed Oct 05 2005, 02:47:09PM EDT]
> >>  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
> >> +	for x in $EBUILD_DEATH_HOOKS; do
> >> +		${x} "$1" "$2" "$3"
> >> +       done
> >>         exit 1
> >>  }
> 
> Is this exactly what went in?  It looks like you're trying to use
> positional params that were shifted earlier.

No, the hooks are called with "$@" actually, plus some checks to 
ensure that
A) the output goes to stderr, which is the norm for die
B) the hooks aren't engaged during depends phase.

if people are after the func/line/exit code being handed to the hook, 
it can be changed, the intention was for this to allow dumping extra 
debug info.
~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-05 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20051005163317.GA6783@toucan.gentoo.org>
     [not found] ` <20051005164801.GC7855@nightcrawler>
2005-10-05 18:47   ` [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die Brian Harring
2005-10-05 18:55     ` Daniel Ostrow
2005-10-05 19:04     ` Aron Griffis
2005-10-05 19:14       ` Brian Harring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox