]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100220: Fix error handling in make rules (GH-100328)
authorMichał Górny <mgorny@gentoo.org>
Fri, 7 Apr 2023 18:23:59 +0000 (18:23 +0000)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2023 18:23:59 +0000 (13:23 -0500)
Set `SHELL = /bin/sh -e` to ensure that complex recipes fail on the first error rather than incorrectly reporting success.

Co-authored-by: Zachary Ware <zach@python.org>
Makefile.pre.in
Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst [new file with mode: 0644]

index 1c1bddcad82475c0107c1ac6e57f6f7f3385dac8..fefa5d4e8147bf340f01b8913151578d3d45c929 100644 (file)
@@ -59,7 +59,7 @@ DSYMUTIL_PATH=  @DSYMUTIL_PATH@
 GNULD=         @GNULD@
 
 # Shell used by make (some versions default to the login shell, which is bad)
-SHELL=         /bin/sh
+SHELL=         /bin/sh -e
 
 # Use this to make a link between python$(VERSION) and python in $(BINDIR)
 LN=            @LN@
diff --git a/Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst b/Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst
new file mode 100644 (file)
index 0000000..7135317
--- /dev/null
@@ -0,0 +1,4 @@
+Changed the default value of the ``SHELL`` Makefile variable from ``/bin/sh``
+to ``/bin/sh -e`` to ensure that complex recipes correctly fail after an error.
+Previously, ``make install`` could fail to install some files and yet return
+a successful result.