From f54c73d5f31e3c4396e2bea688e1887e4c6fdae5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 28 Nov 2024 22:43:03 +0100 Subject: [PATCH] Fix Partition split_path calculation Now that we use workdir() in make_image(), we have to change the Partition initializer to remove the path added by workdir() again to get the proper path on the host. Fixes #3242. --- mkosi/partition.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkosi/partition.py b/mkosi/partition.py index 49d3fcd81..282fae37e 100644 --- a/mkosi/partition.py +++ b/mkosi/partition.py @@ -23,7 +23,10 @@ def from_dict(cls, dict: Mapping[str, Any]) -> "Partition": type=dict["type"], uuid=dict["uuid"], partno=int(partno) if (partno := dict.get("partno")) else None, - split_path=Path(p) if ((p := dict.get("split_path")) and p != "-") else None, + # We have to translate the sandbox path to the path on the host by removing the /work prefix. + split_path=( + Path(p.removeprefix("/work")) if ((p := dict.get("split_path")) and p != "-") else None + ), roothash=dict.get("roothash"), )