Summary: | sys-apps/portage: throw an error if an ebuild calls a function which does not exist in that context | ||
---|---|---|---|
Product: | Portage Development | Reporter: | hanetzer |
Component: | Conceptual/Abstract Ideas | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | CC: | flx.bier, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=703258 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
hanetzer
2018-08-07 01:30:20 UTC
At the very least, this should be able to be turned on via a portage FEATURES flag, and be stuck into the developer profile target. I guess what you're suggesting is equivalent to 'set -e'? Wouldn't that require EAPI support, since every eclass and ebuild function would have to be well behaved for 'set -e'? (In reply to Zac Medico from comment #2) > I guess what you're suggesting is equivalent to 'set -e'? Wouldn't that > require EAPI support, since every eclass and ebuild function would have to > be well behaved for 'set -e'? Honestly I think it may require a fundamental redoing of how portage discovers phases and such; stock ebuild which comes out of gentoo-syntax throws errors if you turn off set +e in those bin files you mentioned to me on irc. Generally, all that matters with set -e is that anything that's supposed to return non-zero be guarded with somehow. For example, the code that discovers phases already works fine with set -e, since the declare -F call that's supposed to return non-zero is guarded with an 'if' statement. This is the code from ebuild.sh: DEFINED_PHASES= for _f in $_valid_phases ; do if declare -F $_f >/dev/null ; then _f=${_f#pkg_} DEFINED_PHASES+=" ${_f#src_}" fi done [[ -n $DEFINED_PHASES ]] || DEFINED_PHASES=- |