It would be nice to be able to declare a phase function which is run if and only if something fails. I.e. src_compile fails -> pkg_failed is run before everything aborts. Purpose would be to * output messages that point to specific bugs and their solutions * output messages that point to additional interesting logfiles * or more
At a first glance, this seems to make sense. I mean, certainly more sense than the API provided for death hooks right now.
Agreed. Plus we already have e.g. pkg_info which feels similar in spirit. My only hesitation here is: ... surely this has been proposed before? If so, why didn't we do it then?
Precedent seems to suggest pkg_die as the name. There are chromium_pkg_die and java-pkg_die in eclasses, and die_hooks in Portage. (In reply to Sam James from comment #2) > Agreed. Plus we already have e.g. pkg_info which feels similar in spirit. pkg_info is used by exactly one package in the tree (app-emulation/qemu). My main worry is that the new phase function would also have little use. > My only hesitation here is: ... surely this has been proposed before? If so, > why didn't we do it then? I don't remember. Maybe there's little demand for something like this?
I'm not sure whether a good proposal was ever made. It might just have skipped between "death hooks are too ugly to put in PMS" and "death hooks just work, and this is a corner case anyway".