From Fedora Project Wiki

NOTE: This is a draft, and needs a lot of fleshing out -- if people would rather it live somewhere other than under PackagingDrafts, that's fine by me, so long as the bit about _use_internal_dependency_generator is in the wiki somewhere, hopefully sparing at least one other person the loss of several hours :)

RPM usually does an excellent job of figuring out what a package requires and what it depends on, automatically. However, sometimes there are times you want to disable this entirely (_strongly_ discouraged) or filter out certain errant provides.

How rpm does it ("the plumbing")

... probably just a link to elsewhere ...

Disabling dependency auto-generation

Filtering provides

... bit about the different ways and macros here ...

Shared library filtering

Unlike the other types of filtering, in order to override the default req/prov generation one has to explicitly set the _use_internal_dependency_generator to 0 in their spec file.

... note about how this seems to override the other, macro based filters as well (e.g. __perl_provides)

requires filtering

In one's specfile, one could have:

%define    _use_internal_dependency_generator 0
%define    __find_requires %{SOURCE91} would look something like:


if [ -x /usr/lib/rpm/redhat/find-requires ] ; then

$FINDREQ $* | sed -e '/'

See Packaging:AutoProvidesAndRequiresFiltering for more detail.

provides filtering

In one's specfile, one could have:

%define    _use_internal_dependency_generator 0
%define    __find_provides %{SOURCE92} would look something like:


if [ -x /usr/lib/rpm/redhat/find-provides ] ; then

$FINDPROV $* | sed -e '/'

Perl filtering

... pull in bit from Packaging/Perl

Python filtering

Mono filtering