[Piuparts-devel] the chdir story

Andreas Beckmann anbe at debian.org
Sun Apr 14 11:59:32 UTC 2013


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


Andreas



More information about the Piuparts-devel mailing list