Hi Maciej,<div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div>+</div><div>+    binary_needed_symbols = pkg_data["needed_symbols"][binary_info["path"]]</div></blockquote>

<div><br></div></div><div>We need to think whether we will reindex all packages, or we'll accept older data structures without throwing IndexError in the line above.</div></div></blockquote><div><br></div><div>What are the cases where the new checkpkg code is called on an older structure data ?</div>
<div><br></div><div>I can easily ignore the test if needed_symbols is not present. What is your advice ? Is is costly to reindex all packages ?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div><div class="h5"><div> +      needed_symbols[binary] = {}</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>+      for line in elfdump_out:</div>
<div>+        syminfo = self._ParseElfdumpSyminfoLine(line)</div>


<div>+        if not syminfo:</div><div>+          continue</div></blockquote><div><br></div></div></div><div>In what circumstances does syminfo come back empty? Is it when we can't parse the text output?</div></div>
</blockquote><div><br></div><div>Two cases:</div><div>     - when an header line was parsed as there are no information in it :),</div><div>     - when a self symbol reference is found, i.e. a symbol belonging to the binary itself and not a needed symbol provided by a dynamic library.</div>
<div><br></div><div>We could store the self symbol reference in case it will be used by another check but that's not the case currently (and I should rename the function then because it would not be only the needed symbols :) ).</div>
<div><br></div><div>In other cases, an exception is triggered.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im">
<div> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>+<span style="white-space:pre-wrap">      </span>if syminfo['library']:</div><div>+          library = syminfo['library']<span style="white-space:pre-wrap">            </span> </div>



<div>+          del syminfo['library']</div></div></blockquote><div><br></div></div><div>Will the del above actually free anything? If the whole syminfo stays around, all its elements will too.</div></div></blockquote>
<div><br></div><div>We know which library a syminfo belongs to because we store a syminfo in a dictionary with the library as the key. So this reference to the library is not useful anymore but we will only free the reference (and I am not sure it will really free some space as it depends how python handle the data structure).</div>
<div><br></div><div>But on the other hand:</div><div>  - you will gain some space in the database,</div><div>  - there will be less data to transfer and parse when using the rest interface.</div><div><br></div><div>For package like openoffice I suppose this would make a significant difference as it needs a lot of symbols from what I heard (but anyway it is not anymore in the repository).</div>
<div><br></div><div> </div><div>Thanks for your feedback,</div><div><br></div><div>Yann</div><div><br></div><div><br></div><div><br></div></div></div>