[PATCH] access: ensure ACL files are rebuilt when protocol changes

Daniel P. Berrangé posted 1 patch 3 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200916094344.1539557-1-berrange@redhat.com
src/access/meson.build | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] access: ensure ACL files are rebuilt when protocol changes
Posted by Daniel P. Berrangé 3 years, 7 months ago
Meson is not told that the .x protocol files are an input for the
generator, so it doesn't know to setup a rebuild dependancy.

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

diff --git a/src/access/meson.build b/src/access/meson.build
index b23838a776..ff088024f6 100644
--- a/src/access/meson.build
+++ b/src/access/meson.build
@@ -34,6 +34,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
 
   access_gen_headers += custom_target(
     header_file,
+    input: protocol_file,
     output: header_file,
     command: [
       gendispatch_prog, '--mode=aclheader', name, name.to_upper(), protocol_file,
@@ -43,6 +44,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
 
   access_gen_sources += custom_target(
     source_file,
+    input: protocol_file,
     output: source_file,
     command: [
       gendispatch_prog, '--mode=aclbody', name, name.to_upper(),
@@ -53,6 +55,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
 
   access_gen_sym += custom_target(
     syms_file,
+    input: protocol_file,
     output: syms_file,
     capture: true,
     command: [
@@ -62,6 +65,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
 
   access_gen_xml += custom_target(
     xml_file,
+    input: protocol_file,
     output: xml_file,
     capture: true,
     command: [
-- 
2.26.2

Re: [PATCH] access: ensure ACL files are rebuilt when protocol changes
Posted by Pavel Hrdina 3 years, 7 months ago
On Wed, Sep 16, 2020 at 10:43:44AM +0100, Daniel P. Berrangé wrote:
> Meson is not told that the .x protocol files are an input for the
> generator, so it doesn't know to setup a rebuild dependancy.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/access/meson.build | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/access/meson.build b/src/access/meson.build
> index b23838a776..ff088024f6 100644
> --- a/src/access/meson.build
> +++ b/src/access/meson.build
> @@ -34,6 +34,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
>  
>    access_gen_headers += custom_target(
>      header_file,
> +    input: protocol_file,
>      output: header_file,
>      command: [
>        gendispatch_prog, '--mode=aclheader', name, name.to_upper(), protocol_file,

For some reason I though that listing it directly in the command will
make it as dependency.

Before pushing I would modify the command part to replace
`protocol_file` with `'@INPUT@'`.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Re: [PATCH] access: ensure ACL files are rebuilt when protocol changes
Posted by Erik Skultety 3 years, 7 months ago
On Wed, Sep 16, 2020 at 10:43:44AM +0100, Daniel P. Berrangé wrote:
> Meson is not told that the .x protocol files are an input for the
> generator, so it doesn't know to setup a rebuild dependancy.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>