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

Bug 612204

Summary: sys-libs/ncurses: calls econf in parallel -- violates PMS die rules, breaks poor sed impls
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: normal CC: qa
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/portage/pull/137
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 613322    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-03-10 14:22:41 UTC
The ebuild is using the multijob hackery to force running multiple instances of configure in parallel. This causes two kinds of breakage:

1. econf is run inside a subshell which means 'die' may not be handled correctly [this is an explicit violations of the PMS],

2. econf code in Portage is not parallel-safe which means it can randomly misbehave or fail, as reported in [1].

[1]:https://github.com/gentoo/portage/pull/137
Comment 1 SpanKY gentoo-dev 2017-03-10 17:50:59 UTC
you failed to cite any supporting evidence for your claim to (1).  if that was actually true, then plenty of code in Gentoo is broken because we use subshells everywhere, including code you've written.  just grep for "insinto" in the eclass subdir.

here's what PMS actually has to say:
> die
>  If called under the nonfatal command (as per section 11.3.3.1) and with -n
>  as its first parameter, displays a failure message provided in its following
>  argument and then returns a non-zero exit status. Only in EAPIs listed in
>  table 11.10 as supporting option -n. Otherwise, displays a failure message
>  provided in its first and only argument, and then aborts the build process.
>  die is not guaranteed to work correctly if called from a subshell
>  environment.
nope, no "explicit violation" here.

that leaves us with (2) which is being fixed in portage.  i don't see anything for ncurses to do here since portage is being fixed, and this is the first report in 2 years of a problem.