Fix windows mingw toolchain extraction bugs and regressions, fix libpsl build
commit 70ebd1b0:
cerbero: Simplify windows bootstrap a bit
fix_mingw() should only run when platform == windows, and we do not
need to delete `/mingw/lib` when running on 32-bit Windows because we
do not support building on 32-bit Windows at all now.
commit 7a9883bf:
cerbero/shell: Do not silently ignore symlink failures
We should not ignore FileExistsError. We should explicitly raise it.
commit 18ca6752:
cerbero: Fix mingw toolchain extract failure in some cases
On Windows 10 with "Developer mode" enabled and when using Python 3.8,
we weren't extracting the mingw toolchain correctly due to multiple
Python bugs:
* os.symlink does not translate `/` to `\` and writes out an invalid
symlink which cannot be deleted by `rm` or `del`. This has been
fixed by overriding `os.symlink()` in `hacks.py`
* tarfile does not handle FileExistsError from os.symlink correctly
and tries to write an empty directory (which fails), and then
silently ignores it. This means that if you extract a new tarball
that updates a symlink, it will be ignored. This has been fixed by
overriding `tarfile.os.symlink()` in `hacks.py`
* Due to the above bug, when symlink permissions aren't available,
tarfile will always write out an empty directory for symlinks
pointing to a directory. This has been fixed in a more accurate way
inside `fix_mingw()` now.
Tested the following cases:
Fresh bootstrap on Windows 10 with Python 3.8 and "Developer mode" on
Fresh bootstrap on Windows 10 with Python 3.8 and "Developer mode" off
Fresh bootstrap on Windows 10 with Python 3.5 and "Developer mode" on
Fresh bootstrap on Windows 10 with Python 3.5 and "Developer mode" off
The same as above, but re-bootstrapping (overwrite).
Fixes #260 (closed)
commit 66876906:
libpsl.recipe: Fix build on Windows
Closes #265 (closed)
Edited by Nirbheek Chauhan