From: Daan De Meyer Date: Sun, 12 Jan 2025 11:33:30 +0000 (+0100) Subject: Only mount /usr/share/factory if mount point exists in tools tree X-Git-Tag: v25~64^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7763b2c7a7c2a72b473a3ef2e0d5d6991e2b2f44;p=thirdparty%2Fmkosi.git Only mount /usr/share/factory if mount point exists in tools tree Otherwise the bind mount fails as the mount point cannot be created since we mount /usr from the tools tree read-only. --- diff --git a/mkosi/run.py b/mkosi/run.py index f43d7f586..02e0b78dc 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -588,7 +588,11 @@ def sandbox_cmd( # /etc might be full of symlinks to /usr/share/factory, so make sure we use /usr/share/factory # from the host and not from the tools tree. - if tools != Path("/") and (factory := Path("/usr/share/factory")).exists(): + if ( + tools != Path("/") + and (tools / "usr/share/factory").exists() + and (factory := Path("/usr/share/factory")).exists() + ): cmdline += ["--bind", factory, factory] if home := current_home_dir():