1 From 7d1ef4343ed5b2b7ab51469177a42c32c47f0528 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Tue, 6 Sep 2022 01:36:17 -0700
4 Subject: [PATCH] minstall: handle extra error for selinuxenabled
6 Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
8 mesonbuild/minstall.py | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
11 --- a/mesonbuild/minstall.py
12 +++ b/mesonbuild/minstall.py
13 @@ -229,7 +229,7 @@ def restore_selinux_contexts() -> None:
16 subprocess.check_call(['selinuxenabled'])
17 - except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError):
18 + except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError):
19 # If we don't have selinux or selinuxenabled returned 1, failure