Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612204 - sys-libs/ncurses: calls econf in parallel -- violates PMS die rules, breaks poor sed impls
Summary: sys-libs/ncurses: calls econf in parallel -- violates PMS die rules, breaks p...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 613322
  Show dependency tree
 
Reported: 2017-03-10 14:22 UTC by Michał Górny
Modified: 2017-03-20 18:52 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 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.