| Home | Trees | Indices | Help |
|
|---|
|
|
action.Action --+
|
action.RecipeAction --+
|
_AnySource --+
|
_Source --+
|
addSource
r.addSource() - Copy a file into build or
destination directory
r.addSource(sourcename, [apply=,]
[dest=,] [dir=,] [httpHeaders=,] [keyid=,]
[macros=,] [mode=,] [package=,] [rpm=,]
[use=,] [sourceDir=])
r.addSource() class copies a file into the build
directory or destination directory.
The following keywords are recognized by
r.addSource:
apply : A command line to run after storing the file. Macros will be interpolated into this command.
dest : If set, provides the target name of the file in the
build directory. A full pathname can be used. Use either dir, or
dest to specify directory information, but not both. Useful
mainly when fetching the file from an source outside your direct
control, such as a URL to a third-party web site, or copying a file out
of an RPM package. An absolute dest value will be
considered relative to %(destdir)s, whereas a relative
dest value will be considered relative to
%(builddir)s.
dir : The directory in which to store the file, relative to
the build directory. An absolute dir value will be
considered relative to %(destdir)s, whereas a relative
dir value will be considered relative to
%(builddir)s. Defaults to storing file directly in the
build directory.
keyid : Using the keyid keyword indicates the
eight-digit GNU Privacy Guard (GPG) key ID, without leading
0x for the source code archive signature should be sought,
and checked. If you provide the keyid keyword,
r.addSource will search for a file named
sourcename.{sig,sign,asc}, and ensure it is signed
with the appropriate GPG key. A missing signature results in a warning;
a failed signature check is fatal.
macros : If True, interpolate recipe macros in the body of a
patch before applying it. For example, you might have a patch that
changes CFLAGS = -O2 to CFLAGS = %(cflags)s,
which will cause %(cflags)s to be replaced with the
current setting of recipe.macros.cflags. Defaults to
False.
mode: If set, provides the mode to set on the file.
rpm : If the rpm keyword is used,
addSource looks in the file, or URL specified by
rpm for an RPM containing sourcename.
use : A Use flag or boolean, or a tuple of Use flags and/or booleans, that determine whether the archive is actually unpacked or merely stored in the archive.
httpHeaders : A dictionary containing a list of headers to send with the http request to download the source archive. For example, you could set Authorization credentials, fudge a Cookie, or, if direct links are not allowed for some reason (e.g. a click through EULA), a Referer can be provided.
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
r.addSource to look in the
directory specified by sourceDir for the file to install.
An absolute sourceDir value will be considered relative to
%(destdir)s, whereas a relative sourceDir
value will be considered relative to %(builddir)s.
The following examples demonstrate invocations of
r.addSource from within a recipe:
r.addSource('usbcam.console')
The example above is a typical, simple invocation of
r.addSource() which adds the file
usbcam.console directly to the build directory.
r.addSource('pstoraster' , rpm=srpm,
dest='pstoraster.new')
r.addSource specifies the file
pstoraster is to be sought in a source RPM file, and is to
be added to the build directory as pstoraster.new.
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
keywords = The keywords and default values accepted by the class |
|||
|
Inherited from |
|||
|
|||
|
|
|
|||
keywordsThe keywords and default values accepted by the class
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 10 11:46:07 2008 | http://epydoc.sourceforge.net |