[Exherbo-dev] support dying in eclasses in global space

pioto at pioto.org pioto at pioto.org
Sun Jul 13 05:18:24 BST 2008

On Sat, 12 Jul 2008, Saleem Abdulrasool wrote:

> Currently, you cant die in an exlib in global space, which makes it impossible
> to assert that an exheres passes in any data it must.  Discussing this with
> ciaranm, brought up the following:
> - This information needs to be saved as part of the metadata
> - It should be quiet on user's machines

> We could add a new metadata key EXHERES_ERRORS which lists any fatal errors that
> have been encountered while sourcing the exheres.  In order to simplify the
> implementation (and catch all errors at once), we continue sourcing even when an
> error has been raised.  When this key is not empty, the exheres would simply be
> masked.
> [[ -n "${REQUIRED_PARAMETER}" ]] || exerror "Expected REQUIRED_PARAMETER to be set, but it isnt"

maybe add an EXLIB_REQUIRED_PARAMS metadata key as well, to do that above 
line for each listed var in builtin_metadata ?

> While adding this, we could also, optionally, add support for non-fatal
> errors/notices/warnings.  A possible place where such functionality may be
> helpful is with marking deprecated functions.
> deprecated_function()
> {
>   exwarning "deprecated_function is deprecated.  Please use new_function instead"
> }

That function warning wouldn't show up at metadata cache generation time 
unless that function is actually called in the global scope. For such 
warnings, it might be nice to have them (optionally) logged somewhere else 
(like /var/log/paludis-warnings.log). Otherwise I don't know if devs would 
necessarily see them (kinda like the QA warnings portage does).

Mike Kelly

More information about the Exherbo-dev mailing list