]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Enable History= option 36500/head
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, 25 Feb 2025 09:59:50 +0000 (10:59 +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.

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

index 1ae273a5daf8f1bc52d0c0da5c3cd70eff88f80c..a9d096815a8dd939cf8a74dd1efab9e8abbbb440 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 []),