[PATCH v2] meson: do not look for libparted if not necessary

Paolo Bonzini posted 1 patch 2 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220325144354.367171-1-pbonzini@redhat.com
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] meson: do not look for libparted if not necessary
Posted by Paolo Bonzini 2 years, 1 month ago
libparted_dep is not used if -Dstorage_disk=disabled.  Do
not bother looking for it if the disk storage backend was not
requested.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index eb13c7efa4..27c21d1d67 100644
--- a/meson.build
+++ b/meson.build
@@ -1013,7 +1013,7 @@ else
 endif
 
 libparted_version = '1.8.0'
-libparted_dep = dependency('libparted', version: '>=' + libparted_version, required: false)
+libparted_dep = dependency('libparted', version: '>=' + libparted_version, required: get_option('storage_disk'))
 
 libpcap_version = '1.5.0'
 if not get_option('libpcap').disabled()
-- 
2.35.1
Re: [PATCH v2] meson: do not look for libparted if not necessary
Posted by Michal Prívozník 2 years, 1 month ago
On 3/25/22 15:43, Paolo Bonzini wrote:
> libparted_dep is not used if -Dstorage_disk=disabled.  Do
> not bother looking for it if the disk storage backend was not
> requested.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index eb13c7efa4..27c21d1d67 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1013,7 +1013,7 @@ else
>  endif
>  
>  libparted_version = '1.8.0'
> -libparted_dep = dependency('libparted', version: '>=' + libparted_version, required: false)
> +libparted_dep = dependency('libparted', version: '>=' + libparted_version, required: get_option('storage_disk'))
>  
>  libpcap_version = '1.5.0'
>  if not get_option('libpcap').disabled()

Oh sorry, should have mentioned that I've fixed the original patch and
pushed.

Michal