]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
authorChangqing Li <changqing.li@windriver.com>
Thu, 20 Feb 2025 03:57:24 +0000 (11:57 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Feb 2025 12:05:42 +0000 (12:05 +0000)
commitf98299ec2fa65804ceeff634fa50c8d154e1c153
tree68f9d2612959115787f98f76c2b82be09d847ab4
parent7aaf60854c6bc9c075399de7450fe63b21b2883b
Revert "python3-ctypes: depend on ldconfig only if distro-feature set"

In oe-core, function ldconfig_postinst_fragment use exist of
/sbin/ldconfig to decide if ldconfig is runned to generate the cache,
and function _run_ldconfig will run ldconfig to generate cache during
generate rootfs.  ldconfig.service is actually not used since we have
generate ld.so.cache during do_rootfs, refer[1][2][3]. ldconfig
dependency is necessary when ldconfig not in DISTRO_FEATURES.

The reverted commit causes regression when ldconfig not in
DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
ctypes.util.find_library(name) can find the lib if it is installed, now,
since ldconfig is not installed, ctypes.util.find_library(name) cannot
find the lib even if it is installed.

Here is one usecase(gtk+3 lib is installed, ctypes.util.find_library
used to find the lib):
import wx.lib.wxcairo as wxcairo
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/{}init{}.py", line 59, in <module>
  from .wx_cairocffi import _ContextFromDC, _FontFaceFromFont
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 189, in <module>
  gdkLib = _findGDKLib()
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 181, in _findGDKLib
  return _findHelper([libname], 'gdk',
                     "Unable to find the GDK shared library")
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 170, in _findHelper
  raise RuntimeError(msg)
RuntimeError: Unable to find the GDK shared library

[1] https://git.openembedded.org/openembedded-core/tree/meta/classes-global/package.bbclass#n394
[2] https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/rootfs.py#n316
[3] https://github.com/systemd/systemd-stable/blob/v255-stable/units/ldconfig.service

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3_3.13.2.bb