[PATCH] meson: don't install sysconf files unconditionally

Roman Bogorodskiy posted 1 patch 3 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200826140026.44452-1-bogorodskiy@gmail.com
src/meson.build | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
[PATCH] meson: don't install sysconf files unconditionally
Posted by Roman Bogorodskiy 3 years, 8 months ago
There's no need to install sysconf files when init script installation
was not requested, i.e. when configured with init_script=none.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
---
 src/meson.build | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/meson.build b/src/meson.build
index d058cec2e4..5d8deaf548 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -858,13 +858,15 @@ if conf.has('WITH_LIBVIRTD')
   endif
 endif
 
-foreach sysconf : sysconf_files
-  install_data(
-    sysconf['file'],
-    install_dir: sysconfdir / 'sysconfig',
-    rename: [ sysconf['name'] ],
-  )
-endforeach
+if init_script != 'none'
+  foreach sysconf : sysconf_files
+    install_data(
+      sysconf['file'],
+      install_dir: sysconfdir / 'sysconfig',
+      rename: [ sysconf['name'] ],
+    )
+  endforeach
+endif
 
 if conf.has('WITH_DTRACE_PROBES')
   custom_target(
-- 
2.27.0

Re: [PATCH] meson: don't install sysconf files unconditionally
Posted by Daniel P. Berrangé 3 years, 8 months ago
On Wed, Aug 26, 2020 at 06:00:26PM +0400, Roman Bogorodskiy wrote:
> There's no need to install sysconf files when init script installation
> was not requested, i.e. when configured with init_script=none.
> 
> Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
> ---
>  src/meson.build | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

and desirable for this release


> 
> diff --git a/src/meson.build b/src/meson.build
> index d058cec2e4..5d8deaf548 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -858,13 +858,15 @@ if conf.has('WITH_LIBVIRTD')
>    endif
>  endif
>  
> -foreach sysconf : sysconf_files
> -  install_data(
> -    sysconf['file'],
> -    install_dir: sysconfdir / 'sysconfig',
> -    rename: [ sysconf['name'] ],
> -  )
> -endforeach
> +if init_script != 'none'
> +  foreach sysconf : sysconf_files
> +    install_data(
> +      sysconf['file'],
> +      install_dir: sysconfdir / 'sysconfig',
> +      rename: [ sysconf['name'] ],
> +    )
> +  endforeach
> +endif
>  
>  if conf.has('WITH_DTRACE_PROBES')
>    custom_target(
> -- 
> 2.27.0
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|