access: fix po_check when polkit is disabled

The generated org.libvirt.api.policy.in file was recently added to the
POTFILES list as it contains translatable messages.

It is only generated when WITH_POLKIT && WITH_LIBVIRTD is satisfied
though, resulting in the 'po_check' syntax rule failing if either of
those conditions are not met.

It is harmless to unconditionally generate this file, as a separate
rule takes care of of installing it, and the latter remains under
the build conditions.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2025-01-09 10:30:07 +00:00
parent 7a903458f1
commit 9ab2cd48ea

View File

@ -63,10 +63,8 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
)
endforeach
if conf.has('WITH_POLKIT')
access_sources += access_polkit_sources
if conf.has('WITH_LIBVIRTD')
# Generated outside the WITH_POLKIT / WITH_LIBVIRTD condition
# because syntax-check/po_check requires this to exist
polgen = custom_target(
'org.libvirt.api.policy.in',
input: access_perm_h,
@ -77,6 +75,11 @@ if conf.has('WITH_POLKIT')
)
access_generated += polgen
if conf.has('WITH_POLKIT')
access_sources += access_polkit_sources
if conf.has('WITH_LIBVIRTD')
i18n.merge_file(
input: polgen,
output: 'org.libvirt.api.policy',