Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509024 - death hooks do not run when registered in same func when implicit die runs
Summary: death hooks do not run when registered in same func when implicit die runs
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-28 22:10 UTC by SpanKY
Modified: 2014-04-28 22:21 UTC (History)
1 user (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 SpanKY gentoo-dev 2014-04-28 22:10:40 UTC
if you register a die hook in a phase which later triggers an implicit die (e.g. by `emake` failing), then that die hook does not get run properly.  it has to be set at least one phase earlier.

e.g. if you have:
test_hook() { eerror "fooo"; }

and you register it in src_compile:
src_compile() {
  EBUILD_DEATH_HOOKS+=" test_hook"
  emake aslkdjfalksjdf
}

then that hook will not fire.  however, if you move the registration to src_configure, it'll fire fine.  guessing it's because the later die hook phase is run with the env as it existed before src_compile was executed instead of the env at the time of death.