[PATCH] build: fix logic for enabling libssh/libssh2 checks

Daniel P. Berrangé posted 1 patch 2 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210623113355.293955-1-berrange@redhat.com
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] build: fix logic for enabling libssh/libssh2 checks
Posted by Daniel P. Berrangé 2 years, 10 months ago
When 'driver_remote' is 'auto', the 'enabled()' method does not
evaluate to true, causing the libssh/libssh2 checks to be skipped.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 9caae5521b..1fab424fde 100644
--- a/meson.build
+++ b/meson.build
@@ -1005,7 +1005,7 @@ else
 endif
 
 libssh_version = '0.7'
-if get_option('driver_remote').enabled()
+if not get_option('driver_remote').disabled()
   libssh_dep = dependency('libssh', version: '>=' + libssh_version, required: get_option('libssh'))
   if libssh_dep.found()
     conf.set('WITH_LIBSSH', 1)
@@ -1028,7 +1028,7 @@ else
 endif
 
 libssh2_version = '1.3'
-if get_option('driver_remote').enabled()
+if not get_option('driver_remote').disabled()
   libssh2_dep = dependency('libssh2', version: '>=' + libssh2_version, required: get_option('libssh2'))
   if libssh2_dep.found()
     conf.set('WITH_SSH2', 1)
-- 
2.31.1

Re: [PATCH] build: fix logic for enabling libssh/libssh2 checks
Posted by Pavel Hrdina 2 years, 10 months ago
On Wed, Jun 23, 2021 at 12:33:55PM +0100, Daniel P. Berrangé wrote:
> When 'driver_remote' is 'auto', the 'enabled()' method does not
> evaluate to true, causing the libssh/libssh2 checks to be skipped.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>