[csw-maintainers] [GAR] checkpkg statistics collection separation merged into v2

Maciej (Matchek) Blizinski maciej at opencsw.org
Thu Feb 18 14:35:14 CET 2010


I've recently developed a new feature for checkpkg, in which the
checking functions only interact with previously saved package
statistics.  Since it's a fairly large change[1], I'm announcing it
here.  If you're interested in the internals of the change, see the
wiki page[2].

Here's how a an individual check looks like right now:

def CatalognameLowercase(pkg_data, debug):
  errors = []
  pkgname = pkg_data["basic_stats"]["pkgname"]
  catalogname = pkg_data["basic_stats"]["catalogname"]
  if catalogname != catalogname.lower():
    errors.append(checkpkg.CheckpkgTag(
      pkgname,
      "catalogname-not-lowercase"))
  if not re.match(r"^\w+$", catalogname):
    errors.append(checkpkg.CheckpkgTag(
      pkgname,
      "catalogname-is-not-a-simple-word"))
  return errors

I'll keep working on reducing the amount of code necessary to develop
new individual checks.

Another recently added feature is that when checkpkg detects any
problems, it'll print override statements which you can copy/paste to
the GAR build file if you decide that they're false positives.

In the meantime, if you run into any problems with checkpkg, please let me know.

Maciej

[1] https://sourceforge.net/apps/trac/gar/changeset/8650
[2] http://wiki.opencsw.org/checkpkg#toc17


More information about the maintainers mailing list