Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 860363 - [Future EAPI] pkg_failed phase (formalization of death hooks)
Summary: [Future EAPI] pkg_failed phase (formalization of death hooks)
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2022-07-23 21:46 UTC by Andreas K. Hüttel
Modified: 2022-07-25 06:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Hüttel archtester gentoo-dev 2022-07-23 21:46:06 UTC
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
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-24 06:09:30 UTC
At a first glance, this seems to make sense.  I mean, certainly more sense than the API provided for death hooks right now.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-24 06:17:33 UTC
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?
Comment 3 Ulrich Müller gentoo-dev 2022-07-24 08:05:17 UTC
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?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-24 08:16:28 UTC
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".