]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138998: `expat/refresh.sh`: Fail if Step 3 is not completed (GH-139049)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Thu, 18 Sep 2025 10:47:42 +0000 (11:47 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Sep 2025 10:47:42 +0000 (12:47 +0200)
Modules/expat/refresh.sh

index cc7ae1686de052ba0904fd39a0bf43f086dbd6b1..0ea0e85d0469881d82de2490052883bbb228dd81 100755 (executable)
@@ -54,6 +54,13 @@ rm libexpat.tar.gz
 # Step 3: Add the namespacing include to expat_external.h
 sed -i 's/#  define Expat_External_INCLUDED 1/&\n\/* Namespace external symbols to allow multiple libexpat version to\n   co-exist. \*\/\n#include "pyexpatns.h"/' expat_external.h
 
+if ! grep -q '#include "pyexpatns\.h"' expat_external.h; then
+  echo "
+Error: namespacing include not found in expat_external.h;
+This may be due to source changes and will require updating this script" >&2
+  exit 1
+fi
+
 echo "
 Updated! next steps:
 - Verify all is okay: