1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

meson: expand ternary in functions to if statements

Per https://github.com/mesonbuild/meson/issues/5003, ternary doesn't
always work as function args with older versions of meson.
Expand out ternary statements to stay compatible with older versions (< 0.49).
This commit is contained in:
Anita Zhang 2019-10-25 15:46:21 -07:00 committed by Zbigniew Jędrzejewski-Szmek
parent ecefbcc2a8
commit 7bc9ea513a

View File

@ -796,8 +796,8 @@ conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
service_watchdog = get_option('service-watchdog')
substs.set('SERVICE_WATCHDOG',
service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog)
watchdog_value = service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog
substs.set('SERVICE_WATCHDOG', watchdog_value)
substs.set('SUSHELL', get_option('debug-shell'))
substs.set('DEBUGTTY', get_option('debug-tty'))
@ -3069,6 +3069,7 @@ run_target(
command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
############################################################
watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog
status = [
'@0@ @1@'.format(meson.project_name(), meson.project_version()),
@ -3118,7 +3119,7 @@ status = [
'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
'default locale: @0@'.format(default_locale),
'systemd service watchdog: @0@'.format(service_watchdog == '' ? 'disabled' : service_watchdog)]
'systemd service watchdog: @0@'.format(watchdog_opt)]
alt_dns_servers = '\n '.join(dns_servers.split(' '))
alt_ntp_servers = '\n '.join(ntp_servers.split(' '))