From Fedora Project Wiki

Revision as of 01:44, 5 June 2009 by Cweyl (talk | contribs) (initial add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To my knowledge, there are two other filtering systems out there, in addition to the suggested system of Fedora filtering macros. Note that this only discusses the base systems, not any extensions built on top of it (e.g. %perl_default_filter).

PLD Mandriva Suggested Fedora
How implemented In C, directly in the RPM codebase at rpm5.org.[1][2] Combination of macros and filtering shell scripts. A collection of extensible RPM macros.
Filtering supported

Filter macros may be repeated as needed.

Provides stream filtering
%_noautoprov foo
Provides file filtering
%_noautoprovfile foo
Requires stream filtering
%_noautoreq foo
Requires file filtering
%_noautoreqfile foo

Filter macros CANNOT be used multiple times.

Provides stream filtering
%define _provides_exceptions foo
Provides file filtering
%define _exclude_files_from_autoprov foo
Requires stream filtering
%define _requires_exceptions foo
Requires file filtering
%define _exclude_files_from_autoreq foo

Filter macros may be repeated as needed.

Provides stream filtering
%filter_from_provides foo
Provides file filtering
%filter_provides_in foo
Requires stream filtering
%filter_from_requires foo
Requires file filtering
%filter_requires_in foo
Pros
  • Appears to work (though no working example has been seen, pointers appreciated).
  • Does not disable the internal dependency generator globally.
  • Appears to work.
  • Suited for simple applications.
  • Flexible -- behaviour can be altered in the spec file or at a global level.
  • Simple. Very simple.
  • Extensible as needed.
  • PCRE and simple "grep -v" filtering fully supported.
  • Does not disable the internal dependency generator globally.
Cons
  • Does not provide anything that cannot be more simply provided by a pure macro implementation.
  • Embedded in the rpm5.org RPM codebase/fork; may or may not cleanly apply to Fedora RPM.
  • Inflexible, as the system is embedded in RPM itself, any change requires patching and rebuilding RPM.
  • PCRE may or may not be implemented at this point.
  • Difficult to conditionalize.
  • _use_internal_dependency_generator globally disabled.
  • The depreciated find-provides and find-requires scripts are used.
  • Complex system involving two levels of coding (RPM macros and shell scripts).
  • PCRE's cannot be utilized.
  • Unwieldy in anything more than a simple filtering scenario.
  • Does not provide anything that cannot be more simply provided via a pure macro implementation.
  • None ;)
  1. http://www.mail-archive.com/rpm-devel@rpm5.org/msg03396.html
  2. http://rpm5.org/community/rpm-cvs/3138.html