From nobody Sun Feb 8 19:47:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1670846154; cv=none; d=zohomail.com; s=zohoarc; b=BJYFiFsYHATbgft9/U9kjvIMa94VXxJeDGXvMzWDfyanogb1jwCkQDpgqzuI0JVh9JwSSfZAjZKDc+VY8R35v9zr5/DvmLIjmDXZt5jxaJ1tPFATpFYENNcoVygEkrbqwLICIaI2Ja6xV2daqXctZWqJBpXhqp4BdkeG2QYjtuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670846154; 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=Ooxh1ROp4PT8YdDuaz+PNJTUcIOdTUBO8EgB/AJm+XM=; b=PliXFoDcNACtbwHzFUKaL1IbjR/MZeZAD2s8s71XwckuUKeZHGTyKZhlLIR+B8kfZr7FNb3oai5jOgiaVtlBH5n8C8yw/5+MFeHUKlwgKoSkjHugYj0cnGlLFG59PVB7Km1VqRZ+5vfGdHmO8Vbu1mPqIiETSKrJ9X7Q1YlWTbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1670846154434815.168794550392; Mon, 12 Dec 2022 03:55:54 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-493-NXAGB2ZMNUeLZVQe90FjVg-1; Mon, 12 Dec 2022 06:55:49 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67887804186; Mon, 12 Dec 2022 11:55:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54AFF492B00; Mon, 12 Dec 2022 11:55:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 289741946588; Mon, 12 Dec 2022 11:55:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6EE421946589 for ; Mon, 12 Dec 2022 11:55:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7156F40C2007; Mon, 12 Dec 2022 11:55:30 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 150C540C2005 for ; Mon, 12 Dec 2022 11:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670846153; 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=Ooxh1ROp4PT8YdDuaz+PNJTUcIOdTUBO8EgB/AJm+XM=; b=BVghiuK0DH5RZGHBxoc6Kz98yOmB2B3JRnAA/vC0YEVH4EKH7vmq3jqmIEqnZ6EIjs9PBq 1pcd4CjvqRlCzlfhksFhVcSQjHqbxpyG3hPB/fdUvZNWllFbBQdVq8Clhe35ISk/PjePwV ycjvc9r+T8t+2S3TEMR+H41PjwIWeqo= X-MC-Unique: NXAGB2ZMNUeLZVQe90FjVg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] meson: Provide default values for nonexistent xenlight pkgconfig vars Date: Mon, 12 Dec 2022 12:55:28 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670846154954100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It may happen that xenlight pkgconfig file does not contain 'xenfirmwaredir' and/or 'libexec_bin' variables, which is okay and we have code that deals with this situation. But that code is executed when the queried value is an empty string. This may not always be the case and we should specifically set 'default_value' so that the empty string is returned if pkgconfig variable doesn't exist. Fixes: 968479adcfa5c49b29b7b6680dcaffde1408f044 Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f9834a36c2..3d870d77db 100644 --- a/meson.build +++ b/meson.build @@ -1478,8 +1478,8 @@ if not get_option('driver_libxl').disabled() and conf= .has('WITH_LIBVIRTD') libxl_dep =3D dependency('xenlight', version: '>=3D' + libxl_version, re= quired: get_option('driver_libxl')) =20 if libxl_dep.found() - libxl_firmware_dir =3D libxl_dep.get_variable(pkgconfig : 'xenfirmware= dir') - libxl_execbin =3D libxl_dep.get_variable(pkgconfig : 'libexec_bin') + libxl_firmware_dir =3D libxl_dep.get_variable(pkgconfig : 'xenfirmware= dir', default_value: '') + libxl_execbin =3D libxl_dep.get_variable(pkgconfig : 'libexec_bin', de= fault_value: '') if libxl_firmware_dir !=3D '' conf.set_quoted('LIBXL_FIRMWARE_DIR', libxl_firmware_dir) endif --=20 2.37.4