From 1f1fa4f4be3576f1af00b1fbe9e2669b2eaa7af2 Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 28 Sep 2025 15:30:05 +0200 Subject: [PATCH] Do not swallow the configure exit code in configure_wrapper --- configure_wrapper | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure_wrapper b/configure_wrapper index 3eb3eeb00b4..9ce6d67a4dc 100755 --- a/configure_wrapper +++ b/configure_wrapper @@ -1,4 +1,13 @@ #! /bin/sh + +# Note: ./configure will remove all conftest* files, including the +# pytest conftest.py. We work around this by making a copy and +# restoring when we are done, regardless of whether configure succeeds +# or fails. + +set -e + +trap 'mv bak_conftest.py conftest.py; trap - EXIT; exit' EXIT INT HUP TERM + cp conftest.py bak_conftest.py ./real_configure $@ -mv bak_conftest.py conftest.py