build-python: Fix rebuilding with an already checked out directory

After applying patches (with plain 'patch' instead of 'git am'), we
need to reset the tree to be able to check out the targeted version
again.
This commit is contained in:
Martin Storsjö committed 2021-08-17 11:13:45 +03:00
1 parent b0864ea9ae
commit 69d3d40f00
1 file changed
+1
+1
View File
@@ -120,6 +120,7 @@ fi
if [ -n "$SYNC" ] || [ -n "$CHECKOUT_PYTHON" ]; then if [ -n "$SYNC" ] || [ -n "$CHECKOUT_PYTHON" ]; then
cd cpython-mingw cd cpython-mingw
[ -z "$SYNC" ] || git fetch [ -z "$SYNC" ] || git fetch
git reset --hard
git checkout $PYTHON_VERSION_MINGW git checkout $PYTHON_VERSION_MINGW
cat ../patches/python/*.patch | patch -Nup1 cat ../patches/python/*.patch | patch -Nup1
autoreconf -vfi autoreconf -vfi