[PATCH 3/3] meson: Enable ZFS storage backend more often

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

 



Currently, the ZFS storage backend is enabled only if both zfs
and zpool binaries were found during configure phase. This is not
consistent with our attempts to move dependencies on binaries
from compile to runtime. And also it is inconsistent with other
backends, e.g. vstorage.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 meson.build | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/meson.build b/meson.build
index 77ee60977d..488490181f 100644
--- a/meson.build
+++ b/meson.build
@@ -1947,24 +1947,24 @@ if conf.has('WITH_LIBVIRTD')
   endif
 
   if not get_option('storage_zfs').disabled()
-    zfs_enable = true
     foreach name : [ 'zfs', 'zpool' ]
       set_variable(
         '@0@_prog'.format(name),
         find_program(name, required: get_option('storage_zfs'), dirs: libvirt_sbin_path)
       )
-      if not get_variable('@0@_prog'.format(name)).found()
-        zfs_enable = false
-      endif
     endforeach
 
-    if zfs_enable
-      use_storage = true
-      conf.set('WITH_STORAGE_ZFS', 1)
-      foreach name : [ 'zfs', 'zpool' ]
-        conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path())
-      endforeach
-    endif
+    use_storage = true
+    conf.set('WITH_STORAGE_ZFS', 1)
+    foreach name : [ 'zfs', 'zpool' ]
+      prog_var = get_variable('@0@_prog'.format(name))
+      if prog_var.found()
+        prog_path = prog_var.path()
+      else
+        prog_path = name
+      endif
+      conf.set_quoted(name.to_upper(), prog_path)
+    endforeach
   endif
 endif
 
-- 
2.32.0




[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