The relevant action_config function does not return the exit status from the doebuild call.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/4d0f23262b8a51f253af55634a6b85ca https://github.com/gentoo/portage/pull/308
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=78bb69447833895b588bbed42f02b364d3ebbfcc commit 78bb69447833895b588bbed42f02b364d3ebbfcc Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-04-20 22:11:29 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-04-24 19:42:27 +0000 emerge --config: return pkg_config exit status (bug 653638) Fix emerge --config exit status so that it will return 1 if the pkg_config function calls die. Bug: https://bugs.gentoo.org/653638 Reviewed-by: Manuel Rüger <mrueg@gentoo.org> pym/_emerge/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)}
Fixed in portage-2.3.40-r1.