meson: use warning() method

This bumps the required minimum version of meson to 0.44, as
`warning()` method is supported since 0.44.
This commit is contained in:
Yu Watanabe 2018-05-10 14:50:52 +09:00
parent 30a4ddff7f
commit 8ea9fad715
1 changed files with 20 additions and 20 deletions

View File

@ -11,7 +11,7 @@ project('systemd', 'c',
'sysconfdir=/etc',
'localstatedir=/var',
],
meson_version : '>= 0.43',
meson_version : '>= 0.44',
)
libsystemd_version = '0.22.0'
@ -680,18 +680,18 @@ getent_result = run_command('getent', 'passwd', '65534')
if getent_result.returncode() == 0
name = getent_result.stdout().split(':')[0]
if name != nobody_user
message('WARNING:\n' +
' The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
' Your build will result in an user table setup that is incompatible with the local system.')
warning('\n' +
'The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
'Your build will result in an user table setup that is incompatible with the local system.')
endif
endif
id_result = run_command('id', '-u', nobody_user)
if id_result.returncode() == 0
id = id_result.stdout().to_int()
if id != 65534
message('WARNING:\n' +
' The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
' Your build will result in an user table setup that is incompatible with the local system.')
warning('\n' +
'The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
'Your build will result in an user table setup that is incompatible with the local system.')
endif
endif
@ -699,24 +699,24 @@ getent_result = run_command('getent', 'group', '65534')
if getent_result.returncode() == 0
name = getent_result.stdout().split(':')[0]
if name != nobody_group
message('WARNING:\n' +
' The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
' Your build will result in an group table setup that is incompatible with the local system.')
warning('\n' +
'The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
'Your build will result in an group table setup that is incompatible with the local system.')
endif
endif
id_result = run_command('id', '-g', nobody_group)
if id_result.returncode() == 0
id = id_result.stdout().to_int()
if id != 65534
message('WARNING:\n' +
' The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
' Your build will result in an group table setup that is incompatible with the local system.')
warning('\n' +
'The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
'Your build will result in an group table setup that is incompatible with the local system.')
endif
endif
if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
message('WARNING:\n' +
' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
' Please re-check that both "nobody-user" and "nobody-group" options are correctly set.')
warning('\n' +
'The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
'Please re-check that both "nobody-user" and "nobody-group" options are correctly set.')
endif
conf.set_quoted('NOBODY_USER_NAME', nobody_user)
@ -2953,8 +2953,8 @@ status += [
message('\n '.join(status))
if rootprefixdir != rootprefix_default
message('WARNING:\n' +
' Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) +
' systemd used fixed names for unit file directories and other paths, so anything\n' +
' except the default ("@0@") is strongly discouraged.'.format(rootprefix_default))
warning('\n' +
'Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) +
'systemd used fixed names for unit file directories and other paths, so anything\n' +
'except the default ("@0@") is strongly discouraged.'.format(rootprefix_default))
endif