diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-12-19 11:03:34 -0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2018-12-20 13:30:30 -0500 |
commit | f9a35e08acd34173355fbaea391045373d931abb (patch) | |
tree | e61e5297ae6a1645b8b7129d3d05c60e6a714fdf /mesonbuild/msetup.py | |
parent | 7838f9afc390a53d4097f3710b9f30cb52031be9 (diff) | |
download | meson-f9a35e08acd34173355fbaea391045373d931abb.zip meson-f9a35e08acd34173355fbaea391045373d931abb.tar.gz meson-f9a35e08acd34173355fbaea391045373d931abb.tar.bz2 |
msetup: Fix callig meson --wipe inside a build directory
This seems to be related to deleting the current working directory.
Simply deleting all of the trees inside the build directory instead
seems to fix it. This only appears with some combination of generated
targets, running the test case against say "1 trivial" doesn't show the
bug.
See this mesa bug: https://bugs.freedesktop.org/show_bug.cgi?id=109071
Diffstat (limited to 'mesonbuild/msetup.py')
-rw-r--r-- | mesonbuild/msetup.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 63014f1..56a0e9a 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -73,7 +73,15 @@ class MesonApp: coredata.read_cmd_line_file(self.build_dir, options) try: - mesonlib.windows_proof_rmtree(self.build_dir) + # Don't delete the whole tree, just all of the files and + # folders in the tree. Otherwise calling wipe form the builddir + # will cause a crash + for l in os.listdir(self.build_dir): + l = os.path.join(self.build_dir, l) + if os.path.isdir(l): + mesonlib.windows_proof_rmtree(l) + else: + mesonlib.windows_proof_rm(l) finally: # Restore the file path = os.path.dirname(filename) |