]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make install_skeleton_tree independent of Distribution enum
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 4 Oct 2022 15:57:51 +0000 (17:57 +0200)
committerJoerg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 24 Nov 2022 14:51:33 +0000 (15:51 +0100)
Note for bisecting: This breaks skeleton tree on Debian-based distributions.

mkosi/distributions/__init__.py
mkosi/install.py

index b951f9a1c7ede4c25bddb2b00dcca9ee37c4ba97..65705dd7cc961fda67523a030c8f10ebf7110f4f 100644 (file)
@@ -8,6 +8,8 @@ if TYPE_CHECKING:
 
 
 class DistributionInstaller:
+    needs_skeletons_after_bootstrap = False
+
     @classmethod
     def install(cls, state: "MkosiState") -> None:
         raise NotImplementedError
index 9a2c3b8d9c916acd7c7d68205ba009097499e705..6790cfbdda22ee176315a205e7e6325dea129ef5 100644 (file)
@@ -10,7 +10,7 @@ from pathlib import Path
 from textwrap import dedent
 from typing import Any, BinaryIO, Iterator, Optional, cast
 
-from .backend import Distribution, MkosiState, PathString, complete_step
+from .backend import MkosiState, PathString, complete_step
 from .syscall import reflink
 
 
@@ -140,7 +140,11 @@ def install_skeleton_trees(state: MkosiState, cached: bool, *, late: bool=False)
     if cached:
         return
 
-    if not late and state.config.distribution in (Distribution.debian, Distribution.ubuntu):
+    if state.installer is not None:
+        skeletons_after_bootstrap = state.installer.needs_skeletons_after_bootstrap
+    else:
+        skeletons_after_bootstrap = False
+    if not late and skeletons_after_bootstrap:
         return
 
     with complete_step("Copying in skeleton file trees…"):