From: Daniel Turull Date: Fri, 26 Jun 2026 07:38:07 +0000 (+0200) Subject: dlopen-deps.inc: treat soname list as ordered alternatives X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7a0274d8f84c234c0bd4fcec086e2bfed28beef;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git dlopen-deps.inc: treat soname list as ordered alternatives The .note.dlopen format defines the soname array as a list of alternatives (e.g. ["libcrypt.so.2", "libcrypt.so.1"]). The previous code warned for every soname that was not found, even when an earlier entry in the list already satisfied the dependency. Select the first available provider and only warn when no alternative can be resolved. AI-Generated: Claude-opus-4.6 Signed-off-by: Daniel Turull Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/systemd/dlopen-deps.inc b/meta/recipes-core/systemd/dlopen-deps.inc index e0b333398c..82a2ccd389 100644 --- a/meta/recipes-core/systemd/dlopen-deps.inc +++ b/meta/recipes-core/systemd/dlopen-deps.inc @@ -66,15 +66,18 @@ python package_generate_dlopen_deps() { elf = oe.qa.ELFFile(f) elf.open() for dep in parse(extract_segment(f, ".note.dlopen"), elf.isLittleEndian()): + # soname list contains alternatives; find the first available provider + found = False for soname in dep["soname"]: if soname in shlibs: - # TODO assumes the first match is good package, version = list(shlibs[soname].values())[0] dependency = dep_map[dep["priority"]] bb.note(f"{pkg}: adding {dependency} on {package} via .note.dlopen") d.appendVar(f"{dependency}:{pkg}", f" {package} (>= {version})") - else: - bb.warn(f"cannot find {soname}") + found = True + break + if not found: + bb.warn(f"cannot find any provider for dlopen dependency: {dep['soname']}") except oe.qa.NotELFFileError as e: bb.note(f"Cannot extract ELF notes: {e}") pass