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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux