metaonly module xdc.bld.Repository

Model of a package repository

XDCscript usage meta-domain sourced in xdc/bld/Repository.xdc
var Repository = xdc.useModule('xdc.bld.Repository');
module-wide constants & types
per-instance config parameters
    var params = new Repository.Params// Instance config-params object;
        params.attrs// The repository's attributes = Repository.Attrs undefined;
        params.name// The repository's directory name = String undefined;
per-instance functions
 
struct Repository.Attrs

Optional attributes for a repository

XDCscript usage meta-domain
var obj = new Repository.Attrs;
 
    obj.releases = Release.Instance[]  ...
    // 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

XDCscript usage meta-domain
var params = new Repository.Params;
// Instance config-params object
    params.attrs = Repository.Attrs undefined;
    // The repository's attributes
    params.name = String undefined;
    // The repository's directory name
config Repository.attrs  // instance

The repository's attributes

XDCscript usage meta-domain
var params = new Repository.Params;
  ...
params.attrs = Repository.Attrs undefined;
config Repository.name  // instance

The repository's directory name

XDCscript usage meta-domain
var params = new Repository.Params;
  ...
params.name = String undefined;
Repository.addPackages()  // instance

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:
              <pkgName>:<releaseName>
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, 24 Aug 2010 15:39:30 GMT