Package conary :: Package build :: Module packagepolicy :: Class ByDefault
[hide private]
[frames] | no frames]

Class ByDefault

source code

  action.Action --+            
                  |            
action.RecipeAction --+        
                      |        
      policy.BasePolicy --+    
                          |    
              policy.Policy --+
                              |
                             ByDefault
Known Subclasses:
derivedpolicy.ByDefault

NAME

r.ByDefault() - Determines components to be installed by default

SYNOPSIS

r.ByDefault([inclusions || exceptions=exceptions])

DESCRIPTION

The r.ByDefault() policy determines which components should be installed by default at the time the package is installed on the system. The default setting for the ByDefault policy is that the :debug, and :test packages are not installed with the package.

The inclusions and exceptions do not specify filenames. They are either package:component or :component. Inclusions are considered before exceptions, and inclusions and exceptions are considered in the order provided in the recipe, and first match wins.

EXAMPLES

r.ByDefault(exceptions=[':manual'])

Uses r.ByDefault to ignore :manual components when enforcing the policy.

r.ByDefault(exceptions=[':manual']) r.ByDefault('foo:manual')

If these lines are in the bar package, and there is both a foo:manual and a bar:manual component, then the foo:manual component will be installed by default when the foo package is installed, but the bar:manual component will not be installed by default when the bar package is installed.

Instance Methods [hide private]
None
doProcess(self, recipe)
Invocation instance
source code

Inherited from policy.Policy: __init__, compileFilters, do, filterExpArgs, filterExpression, mtimeChanged, policyException, policyInclusion, walkDir

Inherited from policy.BasePolicy: dbg, error, info, postInit, postPolicy, updateArgs, warn

Inherited from policy.BasePolicy (private): _addClassName, _pathAllowed

Inherited from action.RecipeAction: doAction, doPrep, doSuggestAutoBuildReqs, init_error

Inherited from action.Action: addArgs

Inherited from action.Action (private): _applyDefaults

Class Variables [hide private]
  bucket = 8
  requires = (('PackageSpec', 7))
  filetree = 0
where to look for files to which to apply the policy: policy.DESTDIR, the default, walks the files in the destdir, policy.BUILDDIR walks the files in the build directory, and policy.PACKAGE iterates over the packaged files rather than walking the destdir, which besides being possibly faster also applies to files that are not on the filesystem (like device nodes).
  invariantexceptions = [':test', ':debuginfo']
subclasses may set to a list of exception filters that are always applied regardless of what other exceptions may be provided by the recipe; these exceptions being applied is an invariant condition of the doFile method.
  allowUnusedFilters = True

Inherited from policy.Policy: invariantinclusions, invariantsubtrees, keywords, processUnmodified, recursive, rootdir

Method Details [hide private]

doProcess(self, recipe)

source code 
Invocation instance
Returns: None
None
Overrides: policy.Policy.doProcess
(inherited documentation)