"--make-initrd", "yes",
"--bootable", "no",
"--manifest-format", "",
- *(["--source-date-epoch", str(state.config.source_date_epoch)]
- if state.config.source_date_epoch is not None else []),
+ *(["--source-date-epoch", str(state.config.source_date_epoch)] if state.config.source_date_epoch is not None else []),
*(["--locale", state.config.locale] if state.config.locale else []),
*(["--locale-messages", state.config.locale_messages] if state.config.locale_messages else []),
*(["--keymap", state.config.keymap] if state.config.keymap else []),
move_tree(state.config, f, state.config.output_dir)
+def normalize_mtime(root: Path, mtime: Optional[int], directory: Optional[Path] = None) -> None:
+ if mtime is None:
+ return
+
+ directory = directory or Path("")
+
+ with complete_step(f"Normalizing modification times of /{directory}"):
+ os.utime(root / directory, (mtime, mtime), follow_symlinks=False)
+ for p in (root / directory).rglob("*"):
+ os.utime(p, (mtime, mtime), follow_symlinks=False)
+
+
def build_image(args: MkosiArgs, config: MkosiConfig) -> None:
manifest = Manifest(config) if config.manifest_format else None
workspace = tempfile.TemporaryDirectory(dir=config.workspace_dir, prefix=".mkosi-tmp")
if args.verb == Verb.serve:
run_serve(last)
-
-
-def normalize_mtime(root: Path, mtime: Optional[int], directory: Optional[Path] = None) -> None:
- directory = directory or Path("")
- if mtime is None:
- return
-
- with complete_step(f"Normalizing modification times of /{directory}"):
- os.utime(root / directory, (mtime, mtime), follow_symlinks=False)
- for p in (root / directory).rglob("*"):
- os.utime(p, (mtime, mtime), follow_symlinks=False)