<div class="gmail_quote">On Tue, Apr 10, 2012 at 12:02, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt;</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>
&gt; &quot;The suite of statements in a function definition executes with a local namespace<br>
&gt; that is different from the global namespace. This means that all variables created<br>
&gt; within a function are local to that function. When the suite finishes, these<br>
&gt; working variables are discarded.&quot;<br>
&gt;<br>
&gt; In this way the needs_ldconfig variable in linux_so never gets True in the statements<br>
&gt; below this function. As global statement is generally discouraged, a return value<br>
&gt; would be a clean and fast way to solve this issue.<br>
&gt;<br>
&gt; [YOCTO #2205]<br>
&gt;<br>
&gt; Signed-off-by: Andrei Gherzan &lt;<a href="mailto:andrei@gherzan.ro">andrei@gherzan.ro</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/package.bbclass |    4 +++-<br>
&gt;  1 files changed, 3 insertions(+), 1 deletions(-)<br>
&gt;<br>
&gt; diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass<br>
&gt; index d35667a..c98e8fa 100644<br>
&gt; --- a/meta/classes/package.bbclass<br>
&gt; +++ b/meta/classes/package.bbclass<br>
&gt; @@ -1263,6 +1263,7 @@ python package_do_shlibs() {<br>
&gt;       lf = bb.utils.lockfile(d.expand(&quot;${PACKAGELOCK}&quot;))<br>
&gt;<br>
&gt;       def linux_so(root, path, file):<br>
&gt; +             needs_ldconfig = False<br>
&gt;               cmd = d.getVar(&#39;OBJDUMP&#39;, True) + &quot; -p &quot; + pipes.quote(os.path.join(root, file)) + &quot; 2&gt;/dev/null&quot;<br>
&gt;               cmd = &quot;PATH=\&quot;%s\&quot; %s&quot; % (d.getVar(&#39;PATH&#39;, True), cmd)<br>
&gt;               fd = os.popen(cmd)<br>
&gt; @@ -1283,6 +1284,7 @@ python package_do_shlibs() {<br>
&gt;                                       needs_ldconfig = True<br>
&gt;                               if snap_symlinks and (file != this_soname):<br>
&gt;                                       renames.append((os.path.join(root, file), os.path.join(root, this_soname)))<br>
&gt; +             return needs_ldconfig<br>
&gt;<br>
&gt;       def darwin_so(root, path, file):<br>
&gt;               fullpath = os.path.join(root, file)<br>
&gt; @@ -1382,7 +1384,7 @@ python package_do_shlibs() {<br>
&gt;                               if targetos == &quot;darwin&quot; or targetos == &quot;darwin8&quot;:<br>
&gt;                                       darwin_so(root, dirs, file)<br>
&gt;                               elif os.access(path, os.X_OK) or lib_re.match(file):<br>
&gt; -                                     linux_so(root, dirs, file)<br>
&gt; +                                     needs_ldconfig = linux_so(root, dirs, file)<br>
<br>
</div></div>Shouldn&#39;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>