[Piuparts-devel] the chdir story

Dave Steele dsteele at gmail.com
Sun Apr 14 15:24:54 UTC 2013


On Sun, Apr 14, 2013 at 7:59 AM, Andreas Beckmann <anbe at debian.org> wrote:
> On 2013-04-14 12:29, Andreas Beckmann wrote:
>> But then again, what is the actual problem to be solved here?
>>
>> The directory needs to be correct when the internal LogDB is being used.
>> Usually that is only while _compute_package_states() is run. That is
>> currently run implicitly upon the first access of some sort to the states.
>> But only the master really uses this "lazy computation" since it is
>> expensive and is actually only needed when reserve() gets called. The
>> master also accesses LogDB when it receives logs.
>> -report will always need the state computation (and does not need LogDB
>> beyond this)
>
> two untested commits that should improve the situation a bit and may
> completely obsolete the chdir change
>
> preview/explicit-compute-states
>
> Andreas Beckmann (2):
>       lib/db: ensure initialization in public methods
>       p-r,dwke,lib/db: add explicit compute_package_states()
>
> some of the public methods in PackagesDB did not ensure the lazy
> initialized structures they accessed were initialized - not a problem
> with the current call structure, but open for failures on new features
>

There are three candidate solutions to the chdir issue available. Any
will work. My preference is an option that involves a full path
definition for master, and supports lazy. Allowing the lazy algorithms
to do their thing when they want to has made it easier to see where
optimization can best be applied (by, for instance, monitoring the log
times in piuparts-report).

I'd like to be having this discussion outside the scope of faster rdep
calculation.

I can rework and start testing chain_len once a base is established.



More information about the Piuparts-devel mailing list