Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 465192

Summary: [Future EAPI] Please support 'exit hooks'
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: CONFIRMED ---    
Severity: normal CC: esigra, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=860363
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-09 06:15:03 UTC
Some ebuilds and eclasses use EBUILD_DEATH_HOOKS already. I think that feature should be covered in an EAPI and an official, function-based interface shall be developed for it.

Use cases:

- listing additional files to attach to bugs,

- killing leftover processes.
Comment 1 Ulrich Müller gentoo-dev 2013-04-09 06:21:34 UTC
src_death()?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-09 06:51:26 UTC
(In reply to comment #1)
> src_death()?

Maybe. Not sure if it's the most friendly solution since the latter use is more of a enable/disable kind.
Comment 3 Ciaran McCreesh 2013-04-09 07:26:04 UTC
Additional files should be pkg_info.

For killing leftover processes, I'm strongly inclined to say that ebuilds shouldn't be doing that, and that if we're after some kind of ebuild-induced parallelism support, the package mangler should be doing it.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-09 12:56:25 UTC
(In reply to comment #3)
> Additional files should be pkg_info.

Doesn't that imply that pkg_info() has to be aware of ${T} out of the build sequence?

> For killing leftover processes, I'm strongly inclined to say that ebuilds
> shouldn't be doing that, and that if we're after some kind of ebuild-induced
> parallelism support, the package mangler should be doing it.

They're after starting some daemon needed for tests whenever there's no better alternative. For example, dev-python/pymongo needs to start a local instance of mongod for tests. If build is interrupted, the daemon stays alive...

By the way, I'm completely fine with something like using cgroups to kill all the children. But that'll work on Linux only. I just thought it would be better to be able to clean up the mess ebuilds may cause.