[csw-maintainers] Checkpkg test for direct binding

Yann Rouillard yann at pleiades.fr.eu.org
Sat Aug 25 18:51:52 CEST 2012


Hi Maciej,


>> +
>> +    binary_needed_symbols =
>> pkg_data["needed_symbols"][binary_info["path"]]
>>
>
> We need to think whether we will reindex all packages, or we'll accept
> older data structures without throwing IndexError in the line above.
>

What are the cases where the new checkpkg code is called on an older
structure data ?

I can easily ignore the test if needed_symbols is not present. What is your
advice ? Is is costly to reindex all packages ?



>  +      needed_symbols[binary] = {}
>
>> +      for line in elfdump_out:
>> +        syminfo = self._ParseElfdumpSyminfoLine(line)
>> +        if not syminfo:
>> +          continue
>>
>
> In what circumstances does syminfo come back empty? Is it when we can't
> parse the text output?
>

Two cases:
     - when an header line was parsed as there are no information in it :),
     - 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.

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 :) ).

In other cases, an exception is triggered.


>
>
>> + if syminfo['library']:
>> +          library = syminfo['library']
>> +          del syminfo['library']
>>
>
> Will the del above actually free anything? If the whole syminfo stays
> around, all its elements will too.
>

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).

But on the other hand:
  - you will gain some space in the database,
  - there will be less data to transfer and parse when using the rest
interface.

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).


Thanks for your feedback,

Yann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20120825/a10f173f/attachment.html>


More information about the maintainers mailing list