[Piuparts-devel] pull: for-holger
Dave Steele
dsteele at gmail.com
Mon Apr 15 17:57:41 UTC 2013
On Mon, Apr 15, 2013 at 5:34 AM, Andreas Beckmann <anbe at debian.org> wrote:
>
> Andreas Beckmann (3):
> ...
> p-r,dwke,lib/db: add explicit compute_package_states()
>
...meaning you want to keep the chdir's. You're going to change your
mind on this - there are going to be more calls for the library to be
able to work in the directory tree after initialization.
The complaint was memory for the longer log file paths, right?. I work
this out to an issue of 0.1% of a gigabyte needed for the db. This
while the packagesdb memory load in your instance is down by over an
order of magnitude in the last year.
If the extra memory is a concern, you can store the prefix centrally,
and build the full log paths on the fly.
To be honest about this path, you should pull the lazy logic from the
library, and just make sure the code calls an exception in these
cases.
piupartslib/packagesdb.py
show inline notes
View file @ 09b8cb2
... ... @@ -571,6 +571,10 @@ def _compute_package_states(self):
571 571 for state in self._states:
572 572 self._in_state[state].sort()
573 573
574 + def compute_package_states(self):
575 + # this must be called with cwd == master-directory
576 + self._compute_package_states()
577 +
574 578 def get_states(self):
575 579 return self._states
576 580
Really? After some of the changes you've called for in my code, this
just ... really?
More information about the Piuparts-devel
mailing list