]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Enable History= option
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 24 Feb 2025 09:56:26 +0000 (10:56 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 4 Mar 2025 14:45:13 +0000 (15:45 +0100)
This option makes mkosi "remember" all the CLI options specified on
the command line when building an image. This means they don't need
to be specified again when booting the image afterwards or doing any
other operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi
-d opensuse -f" to build an opensuse image and then running "mkosi
sandbox -- meson test -C build TEST-86-MULTI-UKI-PROFILE", running
the test will try to add virtiofs mounts of the fedora~rawhide build
directory on my machine instead of the opensuse one. With the History=
option enabled, it will use the opensuse tumbleweed directory as expected.

We stop setting --extra-search-path and --output-dir in the integration test
wrapper as these are settings that are "remembered" by enabling the History=
option.

(cherry picked from commit 75cf5b0d3a6045e72dacd90f90ae14fa6d817be1)

mkosi.conf
test/integration-test-wrapper.py

index 954012ee0f050bb4d548cc75865a0fc6d490dc80..98f5328163eede945a01f52cdd81998eb32a73fe 100644 (file)
@@ -30,6 +30,7 @@ RepartDirectories=mkosi.repart
 OutputDirectory=build/mkosi.output
 
 [Build]
+History=yes
 ToolsTree=default
 BuildDirectory=build/mkosi.builddir
 CacheDirectory=build/mkosi.cache
index 7dac8998c8a7d0f531a43c44097d3b155555e053..a87b49bd8b9bb498779d66464768237ed525e145 100755 (executable)
@@ -481,8 +481,6 @@ def main() -> None:
     cmd = [
         args.mkosi,
         '--directory', os.fspath(args.meson_source_dir),
-        '--output-dir', os.fspath(args.meson_build_dir / 'mkosi.output'),
-        '--extra-search-path', os.fspath(args.meson_build_dir),
         '--machine', name,
         '--ephemeral=yes',
         *(['--forward-journal', journal_file] if journal_file else []),