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

Bug 264494

Summary: portage stops with an error, if any phase contains set -e
Product: Portage Development Reporter: Markus Duft (RETIRED) <mduft>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 210077, 268228    

Description Markus Duft (RETIRED) gentoo-dev 2009-04-01 11:55:02 UTC
while trying to re merge some of our company local ebuilds, i realized that having set -e in any phase makes portage exit with an error after that phase completed (successfully!). this wasn't the case some revisions back (ok, ok, it's been a few months, since i last tried ;))

my wild guess is, that there was some fork-optimization and a subshell has been removed, which would have reset the set -e (or better, the set -e would not have affected the outer shell - i.e. ebuild.sh).

i'm removing the set -e's from out ebuilds, but still it feels like a bug that setting shell options influences ebuild.sh...
Comment 1 Zac Medico gentoo-dev 2009-04-01 17:09:50 UTC
I don't know why you've noticed a behavior change, but in svn r13273 I've made it call set +e in qa_source(), qa_call(), and die(). A solution involving a subshell would be significantly less practical since we'd have to save the ebuild environment from inside that subshell, and we don't want that code to have to assume that set -e might be enabled.
Comment 2 Zac Medico gentoo-dev 2009-04-11 04:26:35 UTC
This is fixed in 2.2_rc29.
Comment 3 Zac Medico gentoo-dev 2009-05-02 02:41:04 UTC
This is fixed in 2.1.6.12.