root/releases/pkgcore-checks/0.2/README @ jokey%2540gentoo.org-20070118231942-i545knb8i27edf1s

Revision jokey%2540gentoo.org-20070118231942-i545knb8i27edf1s, 4.7 kB (checked in by Markus Ullmann <jokey@…>, 22 months ago)

Minor README fix

Line 
1================
2 pkgcore-checks
3================
4
5Dependencies
6============
7
8pkgcore-checks is developed alongside pkgcore. To run the development
9version of pkgcore-checks you will need the development version of
10pkgcore.
11Otherwise the 0.x version numbers need to match.
12
13The metadata.xml checks require either xmllint (installed as part of
14libxml2) or the python bindings to libxml2 (installed as part of
15libxml2 with USE=python), with the latter preferred for speed reasons.
16
17Installation
18============
19
20No installation is strictly required: just run the ``pcheck`` script and
21as long as you are not root things should work. If you want to make
22pkgcore-checks available system-wide use the provided ``setup.py``
23(see `Installing python modules`_ for details).
24
25Configuration
26=============
27
28No configuration is required, but some configuration makes ``pcheck``
29easier to use.
30
31Suites
32------
33
34With no configuration it will try to guess the repository to use based
35on your working directory and the list of repositories pkgcore knows
36about. This will usually not quite work because the same location
37often has multiple "repositories" with a slightly different
38configuration and ``pcheck`` cannot guess which one to use.
39
40Defining "suites" in the configuration solves this ambiguity. A
41"suite" contains a target repository, optionally a source repository
42to use as a base and optionally a set of checks to run. If there is a
43single suite with a target repository containing the current directory
44it is used. So with the following suite definition in
45``~/.pkgcore.conf``::
46
47  [pcheck-portdir-suite]
48  class=pkgcore_checks.base.Suite
49  target_repo=portdir
50
51you can run ``pcheck`` with no further arguments inside your portage
52directory and it will do the right thing.
53
54For use with overlays you need to define the "source" repo too::
55
56  [pcheck-overlay-suite]
57  class=pkgcore_checks.base.Suite
58  target_repo=/usr/local/portage/private
59  src_repo=portdir
60
61(the ``target_repo`` and ``src_repo`` settings are both names of
62repository sections, not arbitrary filesystem paths).
63
64See Overlays_ for more information on ``src_repo``.
65
66Finally, you can define a different checkset per suite::
67
68  [pcheck-portdir-suite]
69  class=pkgcore_checks.base.Suite
70  target_repo=portdir
71  checkset=no-arch-checks
72
73This disables checks that are not interesting unless you can set
74stable keywords for this suite. See Checksets_ for more information.
75
76Instead of relying on the working directory to pick the right suite
77you can specify one explicitly with ``pcheck --suite``.
78
79Checksets
80---------
81
82By default ``pcheck`` runs all available checks. This is not always
83desired. For example, checks about missing stable keywords are often
84just noise in the output for ebuild devs. A checkset defines a subset
85of checks to run. There are two kinds: one enabling a specific set of
86checks and one running every available check except for the specified
87ones. Examples::
88
89  [no-arch-checks]
90  class=pkgcore_checks.base.Blacklist
91  patterns=unstable_only stale_unstable imlate
92
93  [only-arch-checks]
94  class=pkgcore_checks.base.Whitelist
95  patterns=unstable_only stale_unstable imlate
96
97The first disables the three specified checks, the second enables only
98those three. For available names see ``pcheck --list-checks``.
99
100``patterns`` is a whitespace-separated list. If the values are strings
101they need to match a component of the name in ``--list-checks``
102exactly. If it looks like a regexp (currently defined as "contains a +
103or \*") this needs to match the entire name.
104
105Checksets called ``no-arch-checks`` and ``all-checks`` are defined by
106default.
107
108There are various ways to pick the checkset to use: ``pquery
109--checkset``, the checkset setting of a suite and setting
110``default=true`` on a checkset in the configuration.
111
112Overlays
113--------
114
115Checking just an overlay does not work very well since pkgcore-checks
116needs to know about profiles and checks if all dependencies are
117available. To do this you will usually have to specify a base or
118"source" repo to pull this data from. You can set this with ``pcheck
119--overlayed-repo`` or the ``pcheck -o`` shorthand, or you can set it
120in the configuration file as part of a suite__ definition.
121
122__ Suites_
123
124Reporters
125---------
126
127By default the output is in a colorful human-readable format. For full
128tree checks this format may not be optimal since it is a bit hard to
129grep. To use an output format that prints everything on one line, put
130this in your configuration::
131
132  [pcheck-plain-reporter]
133  class=pkgcore_checks.reporters.plain_reporter
134  default=true
135
136To use a non-default reporter use ``pcheck --reporter``. To see the
137reporters available use ``pconfig configurables
138pcheck_reporter_factory``.
139
140
141.. _`Installing python modules`: http://docs.python.org/inst/
Note: See TracBrowser for help on using the browser.