All of lore.kernel.org
 help / color / mirror / Atom feed
From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <qi.chen@windriver.com>, <alex.kanavin@gmail.com>,
	<richard.purdie@linuxfoundation.org>, <Ross.Burton@arm.com>,
	<mathieu.dubois-briand@bootlin.com>,
	Daniel Turull <daniel.turull@ericsson.com>
Subject: [PATCH v3 1/3] dlopen-deps.inc: treat soname list as ordered alternatives
Date: Tue, 30 Jun 2026 13:50:22 +0200	[thread overview]
Message-ID: <20260630115028.4001775-2-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20260630115028.4001775-1-daniel.turull@ericsson.com>

From: Daniel Turull <daniel.turull@ericsson.com>

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 <daniel.turull@ericsson.com>
---
 meta/recipes-core/systemd/dlopen-deps.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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


  reply	other threads:[~2026-06-30 11:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 11:50 [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 daniel.turull
2026-06-30 11:50 ` daniel.turull [this message]
2026-06-30 11:50 ` [PATCH v3 2/3] systemd: upgrade to 261 daniel.turull
2026-06-30 23:08   ` [OE-core] " Khem Raj
2026-07-01  7:12     ` Daniel Turull
2026-06-30 11:50 ` [PATCH v3 3/3] systemd: add native hwdb generator for hosts without STATX_MNT_ID daniel.turull
2026-07-02  8:36 ` [PATCH v3 0/3] systemd: update to 261 and be compatible with rhel8 Mathieu Dubois-Briand
2026-07-02  8:58   ` Daniel Turull
2026-07-02  9:54     ` Mathieu Dubois-Briand
2026-07-02 11:03       ` Alexander Kanavin
2026-07-02 13:19         ` Daniel Turull
2026-07-02 13:34           ` Richard Purdie
2026-07-02 14:03             ` Daniel Turull
2026-07-02 17:12             ` Alexander Kanavin

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=20260630115028.4001775-2-daniel.turull@ericsson.com \
    --to=daniel.turull@ericsson.com \
    --cc=Ross.Burton@arm.com \
    --cc=alex.kanavin@gmail.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=qi.chen@windriver.com \
    --cc=richard.purdie@linuxfoundation.org \
    /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.