Re: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled

Luca Bocassi
2020-12-14T10:33:38Z

On Fri, 2020-12-11 at 20:34 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Luca Bocassi
> > Sent: den 10 december 2020 13:53
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak
> > dependencies, if enabled
> >
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> >
> > Some libraries are now dlopen'ed and skipped at runtime if
> > not available. Add them to the RRECOMMENDS list, to allow
> > users to exclude them for smaller images even if generally
> > enabled at build time.
> >
> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > ---
> > meta/recipes-core/systemd/systemd_247.1.bb | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_247.1.bb b/meta/recipes-core/systemd/systemd_247.1.bb
> > index f20e86d94b..951bffa23f 100644
> > --- a/meta/recipes-core/systemd/systemd_247.1.bb
> > +++ b/meta/recipes-core/systemd/systemd_247.1.bb
> > @@ -603,6 +603,13 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \
> > systemd-conf \
> > "
> >
> > +# Weak dlopen-style dependencies: if explicitly requested via PACKAGECONFIG, recommend them
> > +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'qrencode', 'qrencode', '', d)} \
> > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn', 'libidn', '', d)} \
> > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn2', 'libidn2', '', d)} \
> > + ${@bb.utils.contains('PACKAGECONFIG', 'cryptsetup', 'cryptsetup', '', d)} \
> > +"
>
> Please write this as:
>
> RRECOMMENDS_${PN} += "${@bb.utils.filter('PACKAGECONFIG', 'cryptsetup libidn libidn2 qrencode', d)}"

Andre suggested instead to add the rrecommends directly in the
packageconfig definition.

--
Kind regards,
Luca Boccassi