From: Daan De Meyer Date: Tue, 27 Jun 2023 14:04:58 +0000 (+0200) Subject: Use systemd-repart's new --offline argument X-Git-Tag: v15~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d655de471d2cadb233d1f43fd54a255064c370e5;p=thirdparty%2Fmkosi.git Use systemd-repart's new --offline argument When building images, we never want to use loop devices, so use --offline=yes in that case. When booting images, we know that systemd-nspawn requires loop devices, so require them for systemd-repart as well using --offline=no. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 85a703bbf..3972b0f22 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1609,6 +1609,7 @@ def make_image(state: MkosiState, skip: Sequence[str] = [], split: bool = False) "--dry-run=no", "--json=pretty", "--no-pager", + "--offline=yes", "--root", state.root, state.staging / state.config.output_with_format, ] @@ -1924,7 +1925,7 @@ def nspawn_knows_arg(arg: str) -> bool: def finalize_image(image: Path, *, size: str) -> None: - run(["systemd-repart", "--image", image, "--size", size, "--no-pager", "--dry-run=no", image]) + run(["systemd-repart", "--image", image, "--size", size, "--no-pager", "--dry-run=no", "--offline=no", image]) @contextlib.contextmanager