Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465192 - [Future EAPI] Please support 'exit hooks'
Summary: [Future EAPI] Please support 'exit 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: 2013-04-09 06:15 UTC by Michał Górny
Modified: 2016-10-15 20:25 UTC (History)
2 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 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.