diff options
author | Rosen Penev <rosenp@gmail.com> | 2022-09-22 15:41:28 -0700 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-10-02 16:05:32 +0200 |
commit | 875e17774bafb132a93d66f1d7b2c6a2deec2030 (patch) | |
tree | 49d958c88ad9be3940049accf2cc703029c0f4fc /tools/meson/patches | |
parent | 2ad949b11dbaa4c634868d55a4452d5a558776bd (diff) | |
download | upstream-875e17774bafb132a93d66f1d7b2c6a2deec2030.tar.gz upstream-875e17774bafb132a93d66f1d7b2c6a2deec2030.tar.bz2 upstream-875e17774bafb132a93d66f1d7b2c6a2deec2030.zip |
tools/meson: backport WSL2 fix
For some reason, Microsoft's Plan9 driver returns IOError on missing
file.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tools/meson/patches')
-rw-r--r-- | tools/meson/patches/010-wsl2.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/meson/patches/010-wsl2.patch b/tools/meson/patches/010-wsl2.patch new file mode 100644 index 0000000000..4ab799d699 --- /dev/null +++ b/tools/meson/patches/010-wsl2.patch @@ -0,0 +1,21 @@ +From 7d1ef4343ed5b2b7ab51469177a42c32c47f0528 Mon Sep 17 00:00:00 2001 +From: Rosen Penev <rosenp@gmail.com> +Date: Tue, 6 Sep 2022 01:36:17 -0700 +Subject: [PATCH] minstall: handle extra error for selinuxenabled + +Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing. +--- + mesonbuild/minstall.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mesonbuild/minstall.py ++++ b/mesonbuild/minstall.py +@@ -229,7 +229,7 @@ def restore_selinux_contexts() -> None: + ''' + try: + subprocess.check_call(['selinuxenabled']) +- except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError): ++ except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError): + # If we don't have selinux or selinuxenabled returned 1, failure + # is ignored quietly. + return |