metaonly module xdc.bld.Repository |
![](../../Arrow_left.png) |
![](../../Arrow_up.png) |
![](../../Arrow_right.png) |
Model of a package repository
var Repository = xdc.useModule('xdc.bld.Repository');
module-wide constants & types
per-instance config parameters
per-instance functions
struct Repository.Attrs |
![](../../Arrow_up.png) |
Optional attributes for a repository
XDCscript usage |
meta-domain |
var obj = new Repository.Attrs;
// releases that this rep is a part of
FIELDS
releases
This array contains releases that will contain the
repository. Thus, a single repository can be part of any set
of releases. Each repository is always added to the
package's "default release" in addition to any releases
specified in the releases array.
SEE
Instance Config Parameters |
![](../../Arrow_up.png) |
XDCscript usage |
meta-domain |
var params = new Repository.Params;
// Instance config-params object
// The repository's attributes
params.name = String undefined;
// The repository's directory name
config Repository.attrs // instance |
![](../../Arrow_up.png) |
The repository's attributes
XDCscript usage |
meta-domain |
var params = new Repository.Params;
...
config Repository.name // instance |
![](../../Arrow_up.png) |
The repository's directory name
XDCscript usage |
meta-domain |
var params = new Repository.Params;
...
params.name = String undefined;
Repository.addPackages() // instance |
![](../../Arrow_up.png) |
Add specified package releases to this repository
XDCscript usage |
meta-domain |
inst.addPackages(String[] names) returns Void
ARGUMENTS
names
An array of strings naming package releases to be added
to the repository. Package releases are named as follows:
where <pkgName> is the name of the package to add to the
repository and <releaseName> is the name of one of that
package's releases. A package release name may be either the
archive file name (relative to the package's base directory)
of the release archive or the name used create the release in
package named <pkgName>.
For example, if the package ti.bios had a release named
exports/ti_bios,src, the following statements would add
this release to the repository named packages:
var r = Pkg.addRepository("packages");
r.addPackages(["ti.bios:exports/ti_bios,src"]);
Alternatively, one can specify the archive file name:
var r = Pkg.addRepository("packages");
r.addPackages(["ti.bios:exports/ti_bios,src.tar"]);
It is possible to get a list of release archive names from a
package via the
xdc.bld.BuildEnvironment.getReleaseDescs()
method. For example, to get the physical archive name of the
default release of the
ti.bios package, the following loop
can be added to a build script:
var archiveName;
var rels = Build.getReleaseDescs('ti.bios');
for (var j = 0; j < rels.length; j++) {
if (rels[j].label == "default") {
archiveName = rels[j].aname;
break;
}
}
// archiveName is now set to the file name of the ti.bios
// default release archive (or undefined)
SEE
generated on Tue, 10 Jul 2012 02:21:43 GMT