[csw-maintainers] Checkpkg test for direct binding

Maciej (Matchek) Bliziński maciej at opencsw.org
Sat Aug 25 23:33:51 CEST 2012


2012/8/25 Yann Rouillard <yann at pleiades.fr.eu.org>

> 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 ?
>

This will happen immediately after someone checks out the updated code.


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

Costly ‒ yes, but it's a one time operation. I've done it a couple of times
already. It can be done in parallel with normal operation; you import into
a new database, and then you swap databases together with checking in the
code.


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

OK, sounds good.


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

Aha, so this is about saving space in the database, not about saving memory
at runtime. Cool.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20120825/9f5632ec/attachment.html>


More information about the maintainers mailing list