@@ -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:
@@ -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"
@@ -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"
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(-)