meson: Move definition of os_release

We're about to introduce another user of the value in a
different scope.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Andrea Bolognani 2023-04-30 11:52:27 +02:00
parent e54a419693
commit 6f42d9610c

View File

@ -24,6 +24,11 @@ if git and not get_option('no_git')
endif
# detect operating system
os_release = run_command('grep', '-E', '^ID(_LIKE)*=', '/etc/os-release', check: false).stdout()
# prepare build configuration data
conf = configuration_data()
@ -1618,7 +1623,6 @@ if not get_option('driver_qemu').disabled()
qemu_user = 'root'
qemu_group = 'wheel'
else
os_release = run_command('grep', '-E', '^ID(_LIKE)*=', '/etc/os-release', check: false).stdout()
# RHEL and CentOS both have ID_LIKE=fedora, SLES has ID_LIKE=suse
if (os_release.contains('fedora') or
os_release.contains('gentoo') or