]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Prevent using Overlay=yes with Format=portable
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 17 Oct 2025 10:59:34 +0000 (12:59 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Fri, 17 Oct 2025 17:28:52 +0000 (19:28 +0200)
Portable services cannot be extension images so let's error out early
if anyone tries to do that.

Fixes #3927

mkosi/__init__.py
mkosi/resources/man/mkosi.1.md

index a77cdb84a0fce24fe33ed2656feb9e157c065f12..556ed70d100182c58401c723f500a33e13373e87 100644 (file)
@@ -2694,6 +2694,16 @@ def check_inputs(config: Config) -> None:
     ):
         die(f"A cache directory must be configured in order to use CacheOnly={config.cacheonly}")
 
+    if config.output_format == OutputFormat.portable and config.overlay:
+        die(
+            "Overlay=yes cannot be used with Format=portable",
+            hint=(
+                "Portable service images are always full images and cannot be overlay images.\n"
+                "See https://systemd.io/PORTABLE_SERVICES/#extension-images for how to use extension\n"
+                "images with portable services."
+            ),
+        )
+
 
 def check_tool(config: Config, *tools: PathString, reason: str, hint: Optional[str] = None) -> Path:
     tool = config.find_binary(*tools)
index 82c2e49b6902b6f19362b8440dad17e767f26369..3406e9c081c6ad1e6aedd83357e5061c27251fa0 100644 (file)
@@ -736,8 +736,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
     initially empty. Thus files that are not modified compared to the base trees
     will not be present in the final output.
 
-    This option may be used to create [systemd *system extensions* or
-    *portable services*](https://uapi-group.org/specifications/specs/extension_image).
+    This option may be used to create [systemd *system extensions*](https://uapi-group.org/specifications/specs/extension_image).
 
 `Seed=`, `--seed=`
 :   Takes a UUID as argument or the special value `random`.