[libvirt PATCH 4/5] meson: Require that both qemu_user and qemu_group are provided

Andrea Bolognani abologna at redhat.com
Wed Jan 26 15:13:15 UTC 2022


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 <abologna at redhat.com>
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index f08a25f53c..36ebe9aa2a 100644
--- a/meson.build
+++ b/meson.build
@@ -1680,10 +1680,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
-- 
2.34.1




More information about the libvir-list mailing list