On Monday 26 January 2009, Richard W.M. Jones wrote:
(To rpmlint-discuss, CC'd to fedora-mingw)
I would like to suppress certain rpmlint errors in a distro/package
specific way, ie. without needing to involve changes to upstream
rpmlint.
Starting from upstream rpmlint 0.86 (not yet released, but necessary patch
included in Fedora's 0.85-2), you have the option to drop additional *config
files to /etc/rpmlint/ and they will be read by rpmlint.
We discussed this in private mail in late october last year, I'm attaching the
mail I sent about this so others are aware of it as well, there are a few
message filtering recipes in it. I also posted a quick note to fedora-devel
about it:
https://www.redhat.com/archives/fedora-devel-list/2008-November/msg00093....
The other problem is that dropping files into /usr/share/rpmlint
isn't
manageable from RPM. Firstly it requires editing an array entry in
/usr/share/rpmlint/Config.py. Secondly (less importantly) it means
that our base package would need to depend on rpmlint.
Instead of modifying /usr/share/rpmlint/Config.py it should be possible to add
entries to the list of checks to run programmatically from
a /etc/rpmlint/*config snippet. There's Config.addCheck(SomeCheck) but I
suppose using that would mean that *only* the added check(s) would be run,
unless you also do addCheck for all of Config.DEFAULT_CHECKS. This is ugly,
I'll look into doing something about it. This stuff might also interfere
with the -c/--check option, I'll look into that too.
It should also be possible to install additional checks wherever you want on
the filesystem (doesn't have to be /usr/share/rpmlint) and add the dirs to
rpmlint's load path by using Config.addCheckDir(dir) from
a /etc/rpmlint/*config file. Or in rpmlint >= 0.86, by adding dirs to
sys.path or PYTHONPATH in environment.
Note that all of the above is from memory, I haven't actually tried it. And
when I added the feature to read /etc/rpmlint/*config, I was primarily
thinking just about message filtering.