root.joinpath(f"etc/apt/sources.list.d/{args.release}-security.list").write_text(f"{security}\n")
+ install_skeleton_trees(args, root, False, late=True)
+
invoke_apt(args, do_run_build_script, root, "update", [])
invoke_apt(args, do_run_build_script, root, "install", ["--no-install-recommends", *extra_packages])
shutil.unpack_archive(cast(str, tree), root)
-def install_skeleton_trees(args: MkosiArgs, root: Path, cached: bool) -> None:
+def install_skeleton_trees(args: MkosiArgs, root: Path, cached: bool, *, late: bool=False) -> None:
if not args.skeleton_trees:
return
if cached:
return
+ if not late and args.distribution in (Distribution.debian, Distribution.ubuntu):
+ return
+
with complete_step("Copying in skeleton file trees…"):
for tree in args.skeleton_trees:
if tree.is_dir():