diff mbox series

[2/3] systemd: dlopen-deps: only warn for missing required providers

Message ID 20260921104520.47933-3-jaipaul.cheernam@est.tech
State New
Headers show
Series nfs-utils: musl upgrade to 3.1.1 and prerequisite systemd fixes | expand

Commit Message

Jaipaul Cheernam Sept. 21, 2026, 10:45 a.m. UTC
package_generate_dlopen_deps() warns whenever it cannot find a provider for
a soname listed in a .note.dlopen segment, regardless of the dependency's
priority. "recommended" and "suggested" entries are optional (they map to
RRECOMMENDS) and legitimately have no provider in some configurations - for
example systemd suggests libintl.so.8, which does not exist on musl, where
the gettext symbols live in libc. This produces spurious warnings on every
musl build.

Only warn for "required" dlopen dependencies; downgrade the missing-provider
message for optional ones to a note.

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 meta/recipes-core/systemd/dlopen-deps.inc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/dlopen-deps.inc b/meta/recipes-core/systemd/dlopen-deps.inc
index 2d43f2dcb8e..15f811de126 100644
--- a/meta/recipes-core/systemd/dlopen-deps.inc
+++ b/meta/recipes-core/systemd/dlopen-deps.inc
@@ -77,7 +77,17 @@  python package_generate_dlopen_deps() {
                                 found = True
                                 break
                         if not found:
-                            bb.warn(f"cannot find any provider for dlopen dependency: {dep['soname']}")
+                            # A missing provider only matters for "required" dlopen
+                            # dependencies. "recommended"/"suggested" ones are optional
+                            # (they map to RRECOMMENDS) and legitimately have no provider
+                            # on some configurations - e.g. systemd suggests libintl.so.8,
+                            # which does not exist on musl where the gettext symbols live
+                            # in libc. Only warn for required deps; note the rest.
+                            msg = f"cannot find any provider for dlopen dependency: {dep['soname']}"
+                            if dep["priority"] == "required":
+                                bb.warn(msg)
+                            else:
+                                bb.note(msg)
                 except oe.qa.NotELFFileError as e:
                     bb.note(f"Cannot extract ELF notes: {e}")
                     pass