<div class="gmail_quote">On Tue, Apr 10, 2012 at 12:02, Richard Purdie <span dir="ltr"><<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Fri, 2012-04-06 at 16:57 +0300, Andrei Gherzan wrote:<br>
> "The suite of statements in a function definition executes with a local namespace<br>
> that is different from the global namespace. This means that all variables created<br>
> within a function are local to that function. When the suite finishes, these<br>
> working variables are discarded."<br>
><br>
> In this way the needs_ldconfig variable in linux_so never gets True in the statements<br>
> below this function. As global statement is generally discouraged, a return value<br>
> would be a clean and fast way to solve this issue.<br>
><br>
> [YOCTO #2205]<br>
><br>
> Signed-off-by: Andrei Gherzan <<a href="mailto:andrei@gherzan.ro">andrei@gherzan.ro</a>><br>
> ---<br>
> meta/classes/package.bbclass | 4 +++-<br>
> 1 files changed, 3 insertions(+), 1 deletions(-)<br>
><br>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass<br>
> index d35667a..c98e8fa 100644<br>
> --- a/meta/classes/package.bbclass<br>
> +++ b/meta/classes/package.bbclass<br>
> @@ -1263,6 +1263,7 @@ python package_do_shlibs() {<br>
> lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))<br>
><br>
> def linux_so(root, path, file):<br>
> + needs_ldconfig = False<br>
> cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"<br>
> cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)<br>
> fd = os.popen(cmd)<br>
> @@ -1283,6 +1284,7 @@ python package_do_shlibs() {<br>
> needs_ldconfig = True<br>
> if snap_symlinks and (file != this_soname):<br>
> renames.append((os.path.join(root, file), os.path.join(root, this_soname)))<br>
> + return needs_ldconfig<br>
><br>
> def darwin_so(root, path, file):<br>
> fullpath = os.path.join(root, file)<br>
> @@ -1382,7 +1384,7 @@ python package_do_shlibs() {<br>
> if targetos == "darwin" or targetos == "darwin8":<br>
> darwin_so(root, dirs, file)<br>
> elif os.access(path, os.X_OK) or lib_re.match(file):<br>
> - linux_so(root, dirs, file)<br>
> + needs_ldconfig = linux_so(root, dirs, file)<br>
<br>
</div></div>Shouldn't this be something like:<br>
<br>
ldconfig = linux_so(root, dirs, file)<br>
needs_ldconfig = needs_ldconfig or ldconfig<br>
<br>
or can this only get called once?<br>
<br></blockquote><div> </div><div>As i recall this is called once but if you want i can amend with your hint.</div><div><br></div><div>@g</div></div><br>