On Sun, 2010-02-07 at 14:19 -0800, Zac Medico wrote: > On 02/07/2010 01:10 PM, Stelian Ionescu wrote: > > Wouldn't it be a good idea to use "set -e" in the ebuild environment ? > > I've seen cases of ebuilds calling epatch without inheriting from eutils > > which compiled and installed (apparently) fine but possibly broken > > binaries. Examples of cases where "set -e" would have helped: 303849, > > 297063, 260279, 221257, > > https://bugs.gentoo.org/buglist.cgi?quicksearch=command+not+found > > and perhaps others I haven't managed to find in bugzilla > > I don't know what kind of side-effects set -e would introduce, but > we can easily add a repoman check for epatch calls without eutils > inherit. "Exit immediately if a pipeline (which may consist of a single simple command), a subshell command enclosed in parentheses, or one of the commands executed as part of a command list enclosed by braces (see SHELL GRAMMAR above) exits with a non-zero status. The shell does not exit if the com- mand that fails is part of the command list immediately following a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !. A trap on ERR, if set, is executed before the shell exits. This option applies to the shell environment and each subshell environment separately (see COMMAND EXECUTION ENVIRONMENT above), and may cause subshells to exit before executing all the commands in the subshell." > Portage already does a search of the build log for 'command not > found' messages and generates a QA warnings. Set > PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa" in /etc/make.conf > if you want to have those warnings logged. My point is that whenever the ebuild is trying to execute a command that does not exist, it should die immediately because there's no way to know how the failure to execute that command might affect the rest of the build process epatch was just an example because it's probably the most used function from eutils.eclass -- Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur. http://common-lisp.net/project/iolib