From: Daan De Meyer Date: Thu, 28 Nov 2024 21:43:03 +0000 (+0100) Subject: Fix Partition split_path calculation X-Git-Tag: v25~135^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f54c73d5f31e3c4396e2bea688e1887e4c6fdae5;p=thirdparty%2Fmkosi.git 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. --- 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 @@ class 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"), )