Bug 2205 - package.bbclass/linux_so never calls ldconfig
Summary: package.bbclass/linux_so never calls ldconfig
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M4
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard: (1.2) Patch Pending
Depends on:
Blocks: 917
  Show dependency tree
 
Reported: 2012-03-30 09:41 UTC by Adrien Bustany
Modified: 2012-04-11 14:18 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Bustany 2012-03-30 09:41:36 UTC
The needs_ldconfig variable referred to in http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass#n1363 (linux_so method) is not the same as the one in http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass#n1283 : line 1283 can't see the variable created in the scope of the "for" loop, so python creates a local one, and the "actual" needs_ldconfig never switches to True. As a consequence, unless the build system of the compiled software calls ldconfig itself, ldconfig will not be called at all, even if all the conditions for it to be called are fulfilled. I'm not sure if the same issue is true for the "renames" list, my python fu being quite limited.
This affects (at least) meta/recipes-support/js/js_1.7.0+1.8.0rc1.bb (see bug 917)
Comment 1 Andrei Gherzan 2012-04-06 09:43:21 UTC
Reproduced and confirmed. I will dig into this.

@g
Comment 2 Andrei Gherzan 2012-04-06 13:53:38 UTC
This is because needs_ldconfig is a local function variable. A way to solve would be to define this variable global but this is a discouraged   Another solution would be to return this value in linux_so and i will patch the package class with this fix. 

Waiting for comments.

Fix:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ag/linux_so

Adrien Bustany, please confirm.