From 5342480fcab9749d0f02d0ace7338cf3af5ebf72 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 2 Jan 2025 12:39:05 +0100 Subject: [PATCH] Make CDROM an upper case option It's an abbrevation so let's make it upper case similar to TPM and KVM. --- mkosi/config.py | 1 + mkosi/resources/man/mkosi.1.md | 2 +- tests/test_json.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkosi/config.py b/mkosi/config.py index 6f26f5308..4b9cc146b 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -3622,6 +3622,7 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple ), ConfigSetting( dest="cdrom", + name="CDROM", metavar="BOOLEAN", nargs="?", section="Runtime", diff --git a/mkosi/resources/man/mkosi.1.md b/mkosi/resources/man/mkosi.1.md index e37a8889f..e11fa1d60 100644 --- a/mkosi/resources/man/mkosi.1.md +++ b/mkosi/resources/man/mkosi.1.md @@ -1611,7 +1611,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`, : Configure whether to use a virtual TPM when booting a virtual machine. Takes a boolean value or `auto`. Defaults to `auto`. -`Cdrom=`, `--cdrom=` +`CDROM=`, `--cdrom=` : Configures whether to attach the image as a CD-ROM device when booting a virtual machine. Takes a boolean. Defaults to `no`. diff --git a/tests/test_json.py b/tests/test_json.py index 160fb523a..f6a8094fd 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -118,10 +118,10 @@ def test_config() -> None: } ], "BuildSourcesEphemeral": true, + "CDROM": false, "CPUs": 2, "CacheDirectory": "/is/this/the/cachedir", "CacheOnly": "always", - "Cdrom": false, "Checksum": false, "CleanPackageMetadata": "auto", "CleanScripts": [