From patchwork Wed Jun 14 16:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25645 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D68A4EB64D8 for ; Wed, 14 Jun 2023 16:38:46 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web11.17687.1686760719119732956 for ; Wed, 14 Jun 2023 09:38:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=sH0KmeTb; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: rs@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35EGcQUp089439; Wed, 14 Jun 2023 11:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686760706; bh=Ajt5hrCufHKrN0MGsxpsuPzi1z+VabQiacp6D/Bz2YA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=sH0KmeTb/geYznI/VMmTL0rTMNVFA6K5RN/kGVViPX3je4SdblpKc9j5M/ngaa5JB XVHDK9CWncQA7wdS8m7Gk5vWLQ3nbAQxkD7YoedMBYl1szMjtYjpmu2ZiIWyX7lmRk idU0PwOwiXSqJ1Slb4F1QCkcIt0Q7PPe35KF+460= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35EGcQXB025189 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Jun 2023 11:38:26 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 14 Jun 2023 11:38:25 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 14 Jun 2023 11:38:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35EGcPZW060182; Wed, 14 Jun 2023 11:38:25 -0500 From: To: , , CC: , Randolph Sapp Subject: [meta-arago][master/kirkstone][PATCHv2 1/4] arago.conf: make things more readable and fix the virtuals Date: Wed, 14 Jun 2023 11:38:11 -0500 Message-ID: <20230614163814.3562779-2-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230614163814.3562779-1-rs@ti.com> References: <20230614163814.3562779-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Jun 2023 16:38:46 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14624 From: Randolph Sapp Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt. Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd. Signed-off-by: Randolph Sapp Reviewed-by: Andrew Davis --- meta-arago-distro/conf/distro/arago.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf index 59ee9926..2606ca39 100644 --- a/meta-arago-distro/conf/distro/arago.conf +++ b/meta-arago-distro/conf/distro/arago.conf @@ -59,13 +59,13 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " opencl opencv openmp" # Set global runtime providers for major components ARAGO_SYSVINIT ?= "0" -VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_login_manager = "busybox shadow" +VIRTUAL-RUNTIME_dev_manager = "${@'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_init_manager = "${@'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_initscripts = "${@'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}" +VIRTUAL-RUNTIME_initramfs = "${@'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}" +VIRTUAL-RUNTIME_login_manager = "${@'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}" -DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" +DISTRO_FEATURES:append = " ${@'' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}" # Distro-specific package configuration PACKAGECONFIG:append:pn-systemd = " coredump"