]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Skip selinux relabeling when building for cache or build script
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 Feb 2023 18:14:36 +0000 (19:14 +0100)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 14 Feb 2023 19:55:54 +0000 (20:55 +0100)
mkosi/__init__.py

index 4174f32ba8fd305509862ff6db17feb673375225..59918e8c3264b2c68ec5123fc5414ecfdfc04ae5 100644 (file)
@@ -3092,6 +3092,9 @@ def run_preset_all(state: MkosiState) -> None:
 
 
 def run_selinux_relabel(state: MkosiState) -> None:
+    if state.for_cache or state.do_run_build_script:
+        return
+
     selinux = state.root / "etc/selinux/config"
     if not selinux.exists():
         return