[csw-maintainers] [csw-pkgsubmissions] newpkgs py_hachoir_core, py_hachoir_parser

Maciej (Matchek) Blizinski maciej at opencsw.org
Wed Apr 28 14:54:29 CEST 2010


No dia 27 de Abril de 2010 23:32, Sebastian Kayser
<skayser at opencsw.org> escreveu:
> Sounds good. Helps to embed standards into the packaging workflow itself

Yes, this is the idea.  I've committed the new check, plus unit tests.

> Does checkpkg already support explanations for thrown errors so that
> people can get a descriptive error message?

Yes, there is a Messenger class, which is passed to every checking
function.  It has a Message(str) function, to which you can pass a
message string.  You don't have to worry about the line breaks, the
text will be automatically reformatted later on.  You can pass it one
long string with no line breaks and it will look nice in the output.
Here's an example:

-----------------8<--------------------
CSWhachoir-parser:
# The package installs files into /opt/csw/lib/python. For example,
# '/opt/csw/lib/python/site-packages'. However, the pkgname doesn't start with
# 'CSWpy-'.
# The package installs files into /opt/csw/lib/python. For example,
# '/opt/csw/lib/python/site-packages'. However, the catalogname doesn't start
# with 'py_'.
# Missing dependencies of CSWhachoir-parser:
# If you don't know of any reasons to include these dependencies, you might
# remove them:
# ? CSWpy-hachoir-core
If any of the reported errors were false positives, you can
override them pasting the lines below to the GAR recipe.
CHECKPKG_OVERRIDES_CSWhachoir-parser += pkgname-does-not-start-with-CSWpy-
CHECKPKG_OVERRIDES_CSWhachoir-parser += catalogname-does-not-start-with-py_
CHECKPKG_OVERRIDES_CSWhachoir-parser += surplus-dependency|CSWpy-hachoir-core
Please note that checkpkg isn't suggesting you should
use these overrides.  It only informs what the overrides could
look like.  You need to understand what are the reported issues about
and use your best judgement to decide whether to fix the underlying
problems or override them.
-----------------8<--------------------

The messages are displayed above the override lines, so if you have a
lot of errors, they might get scrolled up a lot.  I thought about
saving them to disk somewhere, but it would make the UNCOMMITTED
trigger go off.

I'm still looking for a better way to format these messages.  I don't
want to spam the screen with too much of "READ THIS" kind of text,
because with time, people will go numb.  Perhaps some form of a
bullet-point list?  Ideas?


More information about the maintainers mailing list