From: Denys Dmytriyenko <denis@denix.org>
To: rs@ti.com
Cc: detheridge@ti.com, reatmon@ti.com, afd@ti.com,
meta-arago@lists.yoctoproject.org
Subject: Re: [meta-arago][master/kirkstone][PATCH] arago.conf: make things more readable and fix the virtuals
Date: Tue, 6 Jun 2023 18:15:54 -0400 [thread overview]
Message-ID: <20230606221554.GT9226@denix.org> (raw)
In-Reply-To: <20230606191019.702649-1-rs@ti.com>
On Tue, Jun 06, 2023 at 02:10:19PM -0500, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
>
> 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.
Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?
> 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.
>
> Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT
> isn't set, because whatever arago inherits expects sysvinit for some
> reason. This should fix the duplicate init.d and systemd service files
> we've been seeing.
How much testing have you done with this change?
The reason it was done this way is because many packages only provided
sysvinit rc scripts and not systemd unit files and we were relying on
systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
> meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
> index 9164657c..6390a916 100644
> --- a/meta-arago-distro/conf/distro/arago.conf
> +++ b/meta-arago-distro/conf/distro/arago.conf
> @@ -59,13 +59,14 @@ 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"
> -
> -DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
> +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 = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}"
> +DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}"
>
> # Distro-specific package configuration
> PACKAGECONFIG:append:pn-systemd = " coredump"
> --
> 2.40.1
next prev parent reply other threads:[~2023-06-06 22:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 19:10 [meta-arago][master/kirkstone][PATCH] arago.conf: make things more readable and fix the virtuals rs
2023-06-06 21:15 ` Andrew Davis
2023-06-06 22:15 ` Denys Dmytriyenko [this message]
2023-06-06 23:15 ` [EXTERNAL] " Randolph Sapp
[not found] ` <176634F5169028F6.23186@lists.yoctoproject.org>
2023-06-06 23:18 ` Randolph Sapp
2023-06-09 18:32 ` Ryan Eatmon
2023-06-09 19:13 ` Randolph Sapp
2023-06-09 20:39 ` Denys Dmytriyenko
2023-06-12 15:24 ` Andrew Davis
2023-06-12 16:16 ` Denys Dmytriyenko
2023-06-12 16:30 ` Andrew Davis
2023-06-12 17:04 ` Ryan Eatmon
2023-06-12 17:05 ` Denys Dmytriyenko
2023-06-12 21:06 ` Randolph Sapp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230606221554.GT9226@denix.org \
--to=denis@denix.org \
--cc=afd@ti.com \
--cc=detheridge@ti.com \
--cc=meta-arago@lists.yoctoproject.org \
--cc=reatmon@ti.com \
--cc=rs@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.