[Piuparts-devel] faster-rdep-calc/rdep-chain-len

Andreas Beckmann anbe at debian.org
Sat Apr 13 17:32:24 UTC 2013


Hi Dave,

looking at the branches again, there are a few commits that should be
separated from the branch and merged first:

* "Remove need for chdir() before loading packagesdb."
(there is an unrelated change to calling calc_rrdep_counts(), that
should be moved to "Use the on-demand versions of the rdep metric calls.")

* "piuparts-report.py - Avoid sorting passed files by block count." and
"piuparts-report.py - Refactor with_count in write_state_pages()."
should be merged and "reverted" to use the old rrdep interface
temporarily. This is a "bugfix", although the bug is not noticable with
the old interface.

Furthermore I ran into problems with dwke on logs that have no longer
existing packages (see trace below) ... I shuffled around the patches a
bit and changed the rrdep accessors to a) take a package name instead of
a package and b) return -1 if the requested package does not exist.
You can find the first part of that work in
preview/fast-rdep-interface:

f636d1a packagesdb - Refactor out get_rdep_dict() from calc_rrdep_counts().
dc3c5df packagesdb - Cache the rdeps reverse dependency dictionary.
4a28031 packagesdb.py - Use the first provider for virtual pkgs in rdep
calc.
a534869 lib/db: Package: rename count member variables
fa97aaa packagesdb - Add routine to calc rdep metrics by package as needed.
8145a90 packagesdb - Add rdep metric accessors at the PackagesDB level.
8d3d88b piupartslib/packagesdb.py - Add rdep chain length metric calc.
308e6a3 lib/db: check package existence in rrdep accessors
ff21cde lib/db: rrdep accessors: use name lookup


Andreas


Traceback (most recent call last):
  File
"/org/piuparts.debian.org/share/piuparts/master/detect_well_known_errors",
line 506, in <module>
    detect_well_known_errors( conf, problem_list, False, False )
  File
"/org/piuparts.debian.org/share/piuparts/master/detect_well_known_errors",
line 477, in detect_well_known_errors
    recheck, recheck_failed )
  File
"/org/piuparts.debian.org/share/piuparts/master/detect_well_known_errors",
line 462, in process_section
    failures.sort_by_rdeps(pkgsdb)
  File
"/org/piuparts.debian.org/share/piuparts/master/detect_well_known_errors",
line 217, in sort_by_rdeps
    self.failures.sort( key=keyfunc )
  File
"/org/piuparts.debian.org/share/piuparts/master/detect_well_known_errors",
line 211, in keyfunc
    pkgsdb.get_package(get_pkg(x.pkgspec)))
  File
"/org/piuparts.debian.org/lib/python2.6/dist-packages/piupartslib/packagesdb.py",
line 800, in rrdep_count
    if pkg.rrdep_cnt is None:
AttributeError: 'NoneType' object has no attribute 'rrdep_cnt'



More information about the Piuparts-devel mailing list