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

Luca Bocassi
2020-12-14T10:05:10Z

On Fri, 2020-12-11 at 12:55 -0800, Andre McCurdy wrote:
> On Thu, Dec 10, 2020 at 4:53 AM Luca Bocassi <luca.boccassi@gmail.com> wrote:
> > 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.
>
> This seems to imply that these options have some basic level of
> functionality even when the corresponding shared library isn't found
> at runtime. Is that right?

Yes - or more precisely, the options themselves are not available at
runtime without the related library, but fallback is graceful. Eg: you
don't get a QR encoded printout when generating a recovery key, just
the textual form, and a warning that libqrencode is missing.

The system is designed to allow building just once with these features
enabled, but then make the decision on whether to include the
additional library when building the image.

> If there's no functionality at all without the corresponding shared
> library then these should just be regular dependencies (and users who
> need smaller images should disable via the PACKAGECONFIG rather than
> leaving the PACKAGECONFIG enabled but then excluding the shared
> library).
>
> Note also that PACKAGECONFIG gives a way to express recommended
> dependencies (the 5th argument).
>
> https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

Thanks for the suggestion, will send a v2.

--
Kind regards,
Luca Boccassi