From: Daan De Meyer Date: Mon, 6 Nov 2023 10:28:16 +0000 (+0100) Subject: Fix mount_overlay() with multiple lowerdirs X-Git-Tag: v19~26^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2935c68bb2f43d4d2afb8bd1d7b884eaf74d0977;p=thirdparty%2Fmkosi.git Fix mount_overlay() with multiple lowerdirs Multiple lower directories are specified by delimiting with colons, not by specifying the lowerdir= option multiple times. Also, the lowerdirs are stacked right to left so make sure we reverse the given list. --- diff --git a/mkosi/mounts.py b/mkosi/mounts.py index 791f76013..bc1dd5405 100644 --- a/mkosi/mounts.py +++ b/mkosi/mounts.py @@ -74,7 +74,8 @@ def mount( @contextlib.contextmanager def mount_overlay(lowerdirs: Sequence[Path], upperdir: Path, where: Path) -> Iterator[Path]: with tempfile.TemporaryDirectory(dir=upperdir.parent, prefix=f"{upperdir.name}-workdir") as workdir: - options = [f"lowerdir={lower}" for lower in lowerdirs] + [ + options = [ + f"lowerdir={':'.join(os.fspath(p) for p in reversed(lowerdirs))}", f"upperdir={upperdir}", f"workdir={workdir}", # Disable the inodes index and metacopy (only copy metadata upwards if possible)