]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Resolve source path in mount_base_trees()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Jul 2024 07:28:46 +0000 (09:28 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Jul 2024 08:20:35 +0000 (10:20 +0200)
We want to check the extension on the resolved path, not on any
symlinks, so let's make sure we resolve the path first.

mkosi/__init__.py

index 793fb434395ce42ad4101c35359040a96149c9b0..3817a09356f35700c715ffab531b1a69ca5609ae 100644 (file)
@@ -102,6 +102,8 @@ def mount_base_trees(context: Context) -> Iterator[None]:
         for path in context.config.base_trees:
             d = context.workspace / f"bases/{path.name}-{uuid.uuid4().hex}"
 
+            path = path.resolve()
+
             if path.is_dir():
                 bases += [path]
             elif can_extract_tar(path):