From 074695b041f91b0775eb0a95df60ce1fb2eb53f0 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Tue, 4 Aug 2020 13:58:35 -0700 Subject: [PATCH] python: fail build if any modules fail to build. Tees stdout from make to a file (in a way that doesn't suppress an error exit from make from failing the build), and runs a sed script over that file which looks for a list of failed modules, outputs it to ensure it isn't lost in the build output, and exits with an error code to cause the build to fail. --- python/PKGBUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/PKGBUILD b/python/PKGBUILD index 2d7eb019..bd4ed65e 100644 --- a/python/PKGBUILD +++ b/python/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=python pkgname=python pkgver=3.8.5 -pkgrel=3 +pkgrel=4 _pybasever=${pkgver%.*} pkgdesc="Next generation of the python high-level scripting language" arch=('i686' 'x86_64') @@ -144,7 +144,8 @@ build() { --without-ensurepip \ ac_cv_func_bind_textdomain_codeset=yes - LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS" + LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS" > >(tee make-python.log) + sed -ne '/^\s*Failed to build these modules/,$ {p; /^\s*$/q42}' make-python.log } check() {