From 00c1a479142b653e21cf08a81099d7f6bb4da755 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 26 Jan 2022 15:14:13 +0100 Subject: [PATCH] meson: Require that both qemu_user and qemu_group are provided Or that neither is. The current implementation, where if only one of the two is provided the other one will be based on OS-specific defaults is more likely to cause confusion than it is to be helpful. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5d8029a656..79c9fedea1 100644 --- a/meson.build +++ b/meson.build @@ -1683,10 +1683,13 @@ if not get_option('driver_qemu').disabled() endif endif qemu_user = get_option('qemu_user') + qemu_group = get_option('qemu_group') + if (qemu_user == '' and qemu_group != '') or (qemu_user != '' and qemu_group == '') + error('Please specify both qemu_user and qemu_group or neither of them') + endif if qemu_user == '' qemu_user = default_qemu_user endif - qemu_group = get_option('qemu_group') if qemu_group == '' qemu_group = default_qemu_group endif