From nobody Wed Apr 24 23:26:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571925300; cv=none; d=zoho.com; s=zohoarc; b=YjEisWQGECsfpF9L3aNI59V79qyXayD6frvJa8xpvtqqK5rcOfC651Z1/5SaROo6z+aydGlAfQss3gZxsIcwscQoOYuTZ8GyidXhZu4CrCcUPmftwWKawZfqdqSU95ZoqjLFdUt4l3ySby9JoFRmLDQoqLk7AX6NS9h0rhUx5YQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571925300; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=jur82cNpkgFhVzNGfNX4LPV0Ojqyn4QC2qLytjqlTjY=; b=l+GnPOq4wzSGIwUCYeRmwMgztvelITvgw6vNCnjw573gKMGYR0F8TQXlzgZqdzVLq8JmNpeA7a+3GtMugcXd6IiO5FYsaRtYqfw0TyCt2M+oi8aAAM5L665CqGrGFVQvW5REFpmCpmJJquBFWoSd1BnievhWO2AQcxkthP+BWIg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571925300726817.218071591039; Thu, 24 Oct 2019 06:55:00 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-A02JaI8gP66dngWAN6xNHg-1; Thu, 24 Oct 2019 09:54:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1C07107AD31; Thu, 24 Oct 2019 13:54:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C5D060852; Thu, 24 Oct 2019 13:54:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 36D1E4EE6A; Thu, 24 Oct 2019 13:54:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9ODsoKr026084 for ; Thu, 24 Oct 2019 09:54:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id B9FE1608C0; Thu, 24 Oct 2019 13:54:50 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-200-50.brq.redhat.com [10.40.200.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id F38BE60852 for ; Thu, 24 Oct 2019 13:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571925299; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jur82cNpkgFhVzNGfNX4LPV0Ojqyn4QC2qLytjqlTjY=; b=Qrw+WP4CLxu3T1neiZu67tnEBjLxbgdb6j9Eo80GYEV2Gm86pYQMWjhf53NuzfXNUcs2pm K+wMhQb4ykEOHd+wg4Zmh9aDHNCqVXsSYdhh4ENyc14fW0L7qJG/+kIPlZYPQH5IqfE53u 9rt46a0RhWnRDh6lzwCfi3apILJ2Gco= From: Pavel Hrdina To: libvir-list@redhat.com Date: Thu, 24 Oct 2019 15:54:46 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH] meson: fix construction of data directories X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: A02JaI8gP66dngWAN6xNHg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We need to use prefix for all directories and there is no need to check if the user provided path starts with '/' as that is done automatically by the join_paths() function or '/' operator. Signed-off-by: Pavel Hrdina --- meson.build | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index 472e4e2..b293b8c 100644 --- a/meson.build +++ b/meson.build @@ -9,12 +9,30 @@ project( ], ) =20 +prefix =3D get_option('prefix') +datadir =3D prefix / get_option('datadir') +sbindir =3D prefix / get_option('sbindir') + +opt_dirs =3D [ + 'dbus_interfaces', + 'dbus_services', + 'dbus_system_services', + 'dbus_system_policies', + 'polkit_rules', +] + +foreach opt_dir : opt_dirs + value =3D get_option(opt_dir) + varname =3D '@0@_dir'.format(opt_dir) + set_variable(varname, datadir / value) +endforeach + conf =3D configuration_data() conf.set('MESON_VERSION', '0.49.0') conf.set('PACKAGE', meson.project_name()) conf.set('VERSION', meson.project_version()) conf.set('build_root', meson.build_root()) -conf.set('sbindir', get_option('sbindir')) +conf.set('sbindir', sbindir) conf.set('source_root', meson.source_root()) =20 =20 @@ -40,24 +58,6 @@ git =3D run_command('test', '-d', '.git').returncode() = =3D=3D 0 =20 conf.set('SYSTEM_USER', get_option('system_user')) =20 -opt_dirs =3D [ - 'dbus_interfaces', - 'dbus_services', - 'dbus_system_services', - 'dbus_system_policies', - 'polkit_rules', -] - -foreach opt_dir : opt_dirs - value =3D get_option(opt_dir) - varname =3D '@0@_dir'.format(opt_dir) - if opt_dir.startswith('/') - set_variable(varname, value) - else - set_variable(varname, join_paths(get_option('datadir'), value)) - endif -endforeach - =20 # Compile flags =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list