Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-22 Thread Gregory M. Turner
On 10/20/2012 4:07 PM, Zac Medico wrote: On 10/20/2012 03:51 PM, Gregory M. Turner wrote: Anyhow, given that eclasses can probably avoid auto-die() if they need to, this leaves the issue of nonfatal allowing die to return to callers... is there really any reason that die() needs to work this way

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Zac Medico
On 10/20/2012 03:51 PM, Gregory M. Turner wrote: > On 10/20/2012 11:16 AM, Zac Medico wrote: >> On 10/20/2012 03:52 AM, Gregory M. Turner wrote: >>> EAPI[0-3] conventions encourage the habit of writing ebuild code like >>> >>>invoke_fn || ... # handle error, probably by die()ing but maybe not >

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Gregory M. Turner
On 10/20/2012 11:16 AM, Zac Medico wrote: On 10/20/2012 03:52 AM, Gregory M. Turner wrote: EAPI[0-3] conventions encourage the habit of writing ebuild code like invoke_fn || ... # handle error, probably by die()ing but maybe not But eclasses that auto-die violate this expectation and create

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Ciaran McCreesh
On Sat, 20 Oct 2012 14:24:29 -0700 "Gregory M. Turner" wrote: > On 10/20/2012 4:05 AM, Ciaran McCreesh wrote: > > On Sat, 20 Oct 2012 03:52:49 -0700 > > "Gregory M. Turner" wrote: > >> Took me a while, but I think I see why this is correct, now (mostly > >> -- see below). The source of my confus

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Zac Medico
On 10/20/2012 02:24 PM, Gregory M. Turner wrote: > On 10/20/2012 4:05 AM, Ciaran McCreesh wrote: >> On Sat, 20 Oct 2012 03:52:49 -0700 >> "Gregory M. Turner" wrote: >>> Took me a while, but I think I see why this is correct, now (mostly >>> -- see below). The source of my confusion was a mistaken

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Gregory M. Turner
On 10/20/2012 4:05 AM, Ciaran McCreesh wrote: On Sat, 20 Oct 2012 03:52:49 -0700 "Gregory M. Turner" wrote: Took me a while, but I think I see why this is correct, now (mostly -- see below). The source of my confusion was a mistaken assumption that die() would not respect PORTAGE_NONFATAL. T

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Zac Medico
On 10/20/2012 03:52 AM, Gregory M. Turner wrote: > If I indeed understand the facts correctly, I'm still a bit > uncomfortable with your advice to just use "helper || die" in eclass > code. It seems to me that if I follow this recipe, >=EAPI4 kinda works > OK, but EAPI[0-3] doesn't. > > Specifica

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Ciaran McCreesh
On Sat, 20 Oct 2012 03:52:49 -0700 "Gregory M. Turner" wrote: > Took me a while, but I think I see why this is correct, now (mostly > -- see below). The source of my confusion was a mistaken assumption > that die() would not respect PORTAGE_NONFATAL. The source of your confusion is more the impr

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-20 Thread Gregory M. Turner
Thanks for your reply, but I still have some concerns about this. On 10/19/2012 8:11 AM, Zac Medico wrote: Regardless of EAPI, don't call the helpers that die in EAPI 4 unless you want the function to die when the helpers fail, and use helper || die so it behaves the same regardless of EAPI. T

Re: [gentoo-dev] eclass error-handling post-EAPI4

2012-10-19 Thread Zac Medico
On 10/19/2012 07:23 AM, Gregory M. Turner wrote: > I'm cooking up some eclass functions and it occurred to me that perhaps > I had some responsibility regarding EAPI4's new error handling > semantics. After looking into it, it seems that, superficially, the > answer to my question is "no, the EAPI

[gentoo-dev] eclass error-handling post-EAPI4

2012-10-19 Thread Gregory M. Turner
I'm cooking up some eclass functions and it occurred to me that perhaps I had some responsibility regarding EAPI4's new error handling semantics. After looking into it, it seems that, superficially, the answer to my question is "no, the EAPI4 changes only apply to ebuild helpers." Even so, t