Class addAction
source code
action.Action --+
|
action.RecipeAction --+
|
addAction
NAME
r.addAction() - Executes a shell command
SYNOPSIS
r.addAction([action,] [dir=,]
[package)=,] [use=,])
DESCRIPTION
The r.addAction() class executes a shell command during
the source preparation stage, in a manner similar to
r.Run, except that r.Run executes shell
commands later, during the build stage.
KEYWORDS
The following keywords are recognized by
r.addAction:
dir : Specify a directory to change into prior to executing
the command. An absolute directory specified as the dir
value is considered relative to %(destdir)s.
use : A Use flag, or boolean, or a tuple of Use flags, and/or
boolean values which determine whether the source code archive is
actually unpacked or merely stored in the archive.
package : (None) If set, must be a string that specifies the
package (package='packagename'), component
(package=':componentname'), or package and component
(package='packagename:componentname') in which to place
the files added while executing this command. Previously-specified
PackageSpec or ComponentSpec lines will
override the package specification, since all package and component
specifications are considered in strict order as provided by the
recipe
EXAMPLES
The following examples demonstrate invocations of
r.addAction from within a recipe:
r.addAction('sed -i "s/^SUBLEVEL.*/SUBLEVEL =
%(sublevel)s/" Makefile')
Demonstrates use of a command line with macro interpolation upon the
file Makefile.
r.addAction('mv lib/util/shhopt.h
lib/util/pbmshhopt.h')
Demonstrates renaming a file via the mv command.
r.addAction('sh ./prep.sh', dir='/tmp')
Demonstrates changing into the directory
%(destdir)s/var/log and executing the script
prep.sh.
|
|
keywords = {'dir': '', 'package': None}
The keywords and default values accepted by the class
|
|
|
__init__(self,
recipe,
*args,
**keywords)
(Constructor)
| source code
|
- Parameters:
recipe - The recipe object currently being built is provided
automatically by the PackageRecipe object. Passing in
recipe from within a recipe is unnecessary.
dir - Specify a directory to change into prior to executing the
command. An absolute directory specified as the dir
value is considered relative to %(destdir)s.
use - A Use flag, or boolean, or a tuple of Use flags, and/or
boolean values which determine whether the source code archive is
actually unpacked or merely stored in the archive.
package - A string that specifies the package, component, or package and
component in which to place the files added while executing this
command
- Overrides:
action.RecipeAction.__init__
|