From cb7276e51230cf86ed0b36238ba8d3cdf431f15a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 7 Jan 2025 09:54:11 -0500 Subject: [PATCH] rpmostree: Use `--merge` for kargs Without `--merge`, all kernel arguments will be replaced, which is not what is desired in general. Especially with bootc karg support which we definitely want to work with Anaconda. Signed-off-by: Colin Walters --- .../modules/payloads/payload/rpm_ostree/installation.py | 2 +- .../modules/payloads/payload/test_rpm_ostree_tasks.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py index 083f1187db9..6f1e77e50d0 100644 --- a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py +++ b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py @@ -572,7 +572,7 @@ def _set_kargs(self): device_tree.GetDeviceData(root_id) ) - set_kargs_args = ["admin", "instutil", "set-kargs"] + set_kargs_args = ["admin", "instutil", "set-kargs", "--merge"] set_kargs_args.extend(bootloader.GetArguments()) set_kargs_args.append("root=" + device_tree.GetFstabSpec(root_id)) set_kargs_args.append("vconsole.keymap=" + localization.VirtualConsoleKeymap) diff --git a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py index 81727583a5d..03ea494ab25 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py +++ b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py @@ -724,6 +724,7 @@ def test_btrfs_run(self, devdata_mock, storage_mock, localization_mock, ["admin", "instutil", "set-kargs", + "--merge", "BOOTLOADER-ARGS", "root=FSTAB-SPEC", "vconsole.keymap=cs", @@ -773,6 +774,7 @@ def test_nonbtrfs_run(self, devdata_mock, storage_mock, localization_mock, ["admin", "instutil", "set-kargs", + "--merge", "BOOTLOADER-ARGS", "root=FSTAB-SPEC", "vconsole.keymap=cs", @@ -825,6 +827,7 @@ def test_bootupd_run(self, devdata_mock, storage_mock, localization_mock, symlin ["admin", "instutil", "set-kargs", + "--merge", "BOOTLOADER-ARGS", "root=FSTAB-SPEC", "vconsole.keymap=cs", @@ -878,6 +881,7 @@ def test_bootupd_run_with_leavebootorder(self, devdata_mock, storage_mock, local ["admin", "instutil", "set-kargs", + "--merge", "BOOTLOADER-ARGS", "root=FSTAB-SPEC", "vconsole.keymap=cs",