mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +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:
parent
ecefbcc2a8
commit
7bc9ea513a
@ -796,8 +796,8 @@ conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
|
|||||||
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||||
|
|
||||||
service_watchdog = get_option('service-watchdog')
|
service_watchdog = get_option('service-watchdog')
|
||||||
substs.set('SERVICE_WATCHDOG',
|
watchdog_value = service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog
|
||||||
service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog)
|
substs.set('SERVICE_WATCHDOG', watchdog_value)
|
||||||
|
|
||||||
substs.set('SUSHELL', get_option('debug-shell'))
|
substs.set('SUSHELL', get_option('debug-shell'))
|
||||||
substs.set('DEBUGTTY', get_option('debug-tty'))
|
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()])
|
command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog
|
||||||
|
|
||||||
status = [
|
status = [
|
||||||
'@0@ @1@'.format(meson.project_name(), meson.project_version()),
|
'@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 net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
|
||||||
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
|
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
|
||||||
'default locale: @0@'.format(default_locale),
|
'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_dns_servers = '\n '.join(dns_servers.split(' '))
|
||||||
alt_ntp_servers = '\n '.join(ntp_servers.split(' '))
|
alt_ntp_servers = '\n '.join(ntp_servers.split(' '))
|
||||||
|
Loading…
Reference in New Issue
Block a user