]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Make sure tools tree recorded in history doesn't change when in sandbox 3616/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 25 Mar 2025 13:41:26 +0000 (14:41 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 25 Mar 2025 14:26:02 +0000 (15:26 +0100)
commit7498dbfc22121233c4f9166d198ff0f227be04cc
treed1b8eb48760932f1ed99263741910a59dd5a4402
parente994ce9fe8433d169420e90367dc56d127c4a2cc
Make sure tools tree recorded in history doesn't change when in sandbox

Currently, when in the sandbox, the tools tree will always be recorded
as "null" in the history. This causes problems if an image build is done
inside of mkosi sandbox and mkosi is later invoked outside of the sandbox
as the history will say no tools tree was used and so the tools tree won't
be used, even if we're running outside of the sandbox.

To fix the issue, let's make sure we always record the proper tools tree,
but let's not make use of it in the sandbox by moving the sandbox check to
the Config object's tools() method.

We also simplify all the tools tree related checks in run_verb() and add a
check to make sure we don't try to rebuild the default tools tree when in
"mkosi sandbox" as that can't ever work.
mkosi/__init__.py
mkosi/config.py