From bdde7489fdcf72a384f35853f0342d8ce7bd1f66 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 12 Oct 2026 09:31:33 +0200 Subject: [PATCH] image_format: Reject an empty partition UUID seed A target that sets an empty seed gets partition UUIDs derived from its identity, because the disk and sysext drivers treat an empty seed like an unset seed. Any other seed that is not a UUID fails. Use the seed whenever the target sets it, so an empty seed fails the same way. Signed-off-by: Daan De Meyer --- image_format/disk.py | 2 +- image_format/sysext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/image_format/disk.py b/image_format/disk.py index 2d1fe172..6af0e0a1 100755 --- a/image_format/disk.py +++ b/image_format/disk.py @@ -339,7 +339,7 @@ def main(argv: list[str] | None = None) -> None: seed = ( uuid.UUID(spec["seed"]) - if spec["seed"] + if spec["seed"] is not None else _derived_seed(spec["identity"], raw_definitions, partitions) ) out = Path(spec["out"]) if spec["out"] else None diff --git a/image_format/sysext.py b/image_format/sysext.py index 501592b9..5daba9d9 100755 --- a/image_format/sysext.py +++ b/image_format/sysext.py @@ -125,7 +125,7 @@ def main(argv: list[str] | None = None) -> None: seed = ( uuid.UUID(spec["seed"]) - if spec["seed"] + if spec["seed"] is not None else _derived_seed(spec["identity"], spec["name"], release) ) cmd = [