]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Move definition of os_release
authorAndrea Bolognani <abologna@redhat.com>
Sun, 30 Apr 2023 09:52:27 +0000 (11:52 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 5 May 2023 13:08:29 +0000 (15:08 +0200)
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>
meson.build

index b52f3d77ecd90e3b6d202050a3422fd2620cc659..dbc33257bbe9e210bccf9a01b35058977a9baac3 100644 (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