Class ComponentSpec
source code
action.Action --+
|
action.RecipeAction --+
|
policy.BasePolicy --+
|
policy.Policy --+
|
_filterSpec --+
|
ComponentSpec
- Known Subclasses:
-
derivedpolicy.ComponentSpec,
infopolicy.ComponentSpec
NAME
r.ComponentSpec() - Determines which component
each file is in
SYNOPSIS
r.ComponentSpec([componentname, filterexp] ||
[packagename:componentname, filterexp])
DESCRIPTION
The r.ComponentSpec policy includes the filter
expressions that specify the default assignment of files to components.
The expressions are considered in the order in which they are evaluated
in the recipe, and the first match wins. After all the recipe-provided
expressions are evaluated, the default expressions are evaluated. If
no expression matches, then the file is assigned to the
catchall component. Note that in the
packagename:componentname form, the
: must be literal, it cannot be part of a macro.
KEYWORDS
catchall : Specify the component name which gets all
otherwise unassigned files. Default: runtime
EXAMPLES
r.ComponentSpec('manual', '%(contentdir)s/manual/')
Uses r.ComponentSpec to specify that all files below
the %(contentdir)s/manual/ directory are part of the
:manual component.
r.ComponentSpec('foo:bar', '%(sharedir)s/foo/')
Uses r.ComponentSpec to specify that all files below
the %(sharedir)s/foo/ directory are part of the
:bar component of the foo package, avoiding
the need to invoke both the ComponentSpec and
PackageSpec policies.
r.ComponentSpec(catchall='data')
Uses r.ComponentSpec to specify that all files not
otherwise specified go into the :data component instead of
the default {:runtime} component.
|
|
|
|
|
|
|
None
|
|
|
|
|
|
|
| loadFilter(self,
filterType,
map,
filename,
fullpath) |
source code
|
|
|
Inherited from policy.Policy:
compileFilters,
do,
filterExpArgs,
filterExpression,
mtimeChanged,
policyException,
policyInclusion,
walkDir
Inherited from policy.BasePolicy:
dbg,
error,
info,
postInit,
postPolicy,
warn
Inherited from action.RecipeAction:
doAction,
doPrep,
doSuggestAutoBuildReqs,
init_error
Inherited from action.Action:
addArgs
|
__init__(self,
*args,
**keywords)
(Constructor)
| source code
|
- Parameters:
catchall - The component name which gets all otherwise unassigned files.
Default: runtime
- Overrides:
_filterSpec.__init__
|
Call derived classes (ComponentSpec or
PackageSpec) as:
ThisClass('<name>', 'filterexp1', 'filterexp2')
where filterexp is either a regular expression or a tuple
of (regexp[, setmodes[, unsetmodes]])
- Overrides:
_filterSpec.updateArgs
- (inherited documentation)
|