From: Sumanth Gavini <sumanth.gavini@windriver.com>
To: openembedded-core@lists.openembedded.org, alex.kanavin@gmail.com
Cc: esparlin@cisco.com, mathieu.dubois-briand@bootlin.com,
mattware@cisco.com, peter.marko@siemens.com,
randy.macleod@windriver.com, sumanth.gavini@windriver.com
Subject: [PATCH v9 3/8] lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or musl
Date: Fri, 24 Jul 2026 13:04:18 -0700 [thread overview]
Message-ID: <20260724200424.954199-4-sumanth.gavini@windriver.com> (raw)
In-Reply-To: <20260724200424.954199-1-sumanth.gavini@windriver.com>
Fixed:
$ bitbake core-image-full-cmdline:do_testimage
%post(busybox-1.38.0-r0.x86_64_v3): execv(/bin/sh) pid 679
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
It is because busybox and libc6 depends on each other, busybox' elf files
depends on libc6, and libc6's postin depends on busybox' /bin/sh, the do_rootfs
works well is because dnf-native has set RPM_NO_CHROOT_FOR_SCRIPTS=1, but it
would be failed without it.
In rpm 4.20.1, it let the installed files' Requires win, so it installed
busybox firstly, but in rpm 6.0.1, it let the postin's Requires win since
postin would run immediately after the files are installed, this does make
sense, so it installed busybox (which provides /bin/sh required by libc6'
postin) firstly, then we got the errors. I couldn't find which commit made this
change because a lot of files and functions are refactored during 4.20.1 and
6.0.0 (not .1), I also tried bisect, but failed because a lot of do_patch or
do_configure/do_compile failures for each build.
For libc6's the postin is:
#!/bin/sh
if [ x"$D" = "x" ]; then
if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
fi
This doesn't make sense for libc6 since there is no /bin/sh or ldconfig when
libc6 is not ready yet, so just not add ldconfig_postinst_fragment for glibc
to fix the problem.
And also remove the workarounds in oeqa/runtime/cases/dnf.py, they are not
needed any more since the loop dependency is fixed.
Similar to musl.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
meta/lib/oe/package.py | 3 ++-
meta/recipes-core/glibc/glibc-package.inc | 5 +++++
meta/recipes-core/musl/musl_git.bb | 4 ++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index d047e41a78..8ccd89a190 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -1853,7 +1853,8 @@ def process_shlibs(pkgfiles, d):
if s[0] not in shlib_provider:
shlib_provider[s[0]] = {}
shlib_provider[s[0]][s[1]] = (pkg, pkgver)
- if needs_ldconfig:
+ if needs_ldconfig and \
+ not bb.utils.to_boolean(d.getVar('SKIP_LDCONFIG_POSTINST_FRAGMENT:%s' % pkg)):
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
postinst = d.getVar('pkg_postinst:%s' % pkg)
if not postinst:
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 3d721d8f69..bea841b047 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -298,6 +298,11 @@ pkg_postinst:nscd () {
fi
fi
}
+
+# Avoid loop dependencies between /bin/sh and libc.so.6
+SKIP_LDCONFIG_POSTINST_FRAGMENT:${PN} = "1"
+do_package[vardeps] += "SKIP_LDCONFIG_POSTINST_FRAGMENT:${PN}"
+
CONFFILES:nscd = "${sysconfdir}/nscd.conf"
SYSTEMD_PACKAGES = "nscd"
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 3aec643c40..057113bf16 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -80,4 +80,8 @@ LEAD_SONAME = "libc.so"
INSANE_SKIP:${PN}-dev = "staticdev"
INSANE_SKIP:${PN} = "libdir"
+# Avoid loop dependencies between /bin/sh and libc.so
+SKIP_LDCONFIG_POSTINST_FRAGMENT:${PN} = "1"
+do_package[vardeps] += "SKIP_LDCONFIG_POSTINST_FRAGMENT:${PN}"
+
UPSTREAM_CHECK_COMMITS = "1"
next prev parent reply other threads:[~2026-07-24 20:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 14:09 [PATCH v8 0/9] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-03-12 14:09 ` [PATCH v8 1/9] package_rpm.bbclass: Drop external dependency generator to support rpm 6 liezhi.yang
2026-03-12 14:09 ` [PATCH v8 2/9] package_rpm.bbclass: Define _lib and _libdir for rpmbuild liezhi.yang
2026-03-12 14:09 ` [PATCH v8 3/9] lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or musl liezhi.yang
2026-03-12 14:09 ` [PATCH v8 4/9] glib/python3/acl: Add pkgconfig to RDEPENDS liezhi.yang
2026-03-14 8:02 ` [OE-core] " Richard Purdie
2026-03-14 23:36 ` Ross Burton
2026-03-12 14:09 ` [PATCH v8 5/9] lib/oe/package.py: Don't redirect stderr liezhi.yang
2026-03-12 14:09 ` [PATCH v8 6/9] target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES liezhi.yang
2026-03-12 14:09 ` [PATCH v8 7/9] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-03-12 14:09 ` [PATCH v8 8/9] libarchive: upgrade 3.8.5 -> 3.8.6 liezhi.yang
2026-03-12 14:09 ` [PATCH v8 9/9] libarchive: Make it work with rpm 6 liezhi.yang
2026-03-12 15:52 ` [PATCH v8 0/9] rpm: 4.20.1 -> 6.0.1 Mathieu Dubois-Briand
2026-03-13 4:54 ` [OE-core] " Robert Yang
2026-03-13 6:24 ` Mathieu Dubois-Briand
2026-03-13 18:58 ` Mathieu Dubois-Briand
[not found] ` <189C7BAFC42D9B2E.1443259@lists.openembedded.org>
2026-03-14 7:00 ` Mathieu Dubois-Briand
2026-07-17 16:22 ` Randy MacLeod
2026-07-17 16:36 ` Alexander Kanavin
2026-07-24 20:04 ` [PATCH v9 0/8] rpm: 4.20.1 -> 6.0.2 Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 1/8] package_rpm.bbclass: Drop external dependency generator to support rpm 6 Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 2/8] package_rpm.bbclass: Define _lib and _libdir for rpmbuild Sumanth Gavini
2026-07-24 20:04 ` Sumanth Gavini [this message]
2026-07-24 20:04 ` [PATCH v9 4/8] lib/oe/package.py: Filter out /usr/bin/pkg-config file dependency Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 5/8] lib/oe/package.py: Don't redirect stderr Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 6/8] target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 7/8] rpm: 4.20.1 -> 6.0.2 Sumanth Gavini
2026-07-24 20:04 ` [PATCH v9 8/8] libarchive: Make it work with rpm 6 Sumanth Gavini
2026-07-26 14:29 ` [OE-core] [PATCH v9 0/8] rpm: 4.20.1 -> 6.0.2 Richard Purdie
2026-07-27 8:13 ` Adam Duskett
2026-07-27 23:07 ` [OE-core] " Gavini, Sumanth
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=20260724200424.954199-4-sumanth.gavini@windriver.com \
--to=sumanth.gavini@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=esparlin@cisco.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=mattware@cisco.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.marko@siemens.com \
--cc=randy.macleod@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox