-
Notifications
You must be signed in to change notification settings - Fork 5
Repository Specification
See also: RSpec imports
A Repository Specification (RSpec) is a versatile format used to define how the buildsystem can access build related data. It is primarily meant to be used within a View
As an example, consider this build commandline:
ctx.py buildcomp --bconf msvc_win32_urel.bc my_component.comp
For this operation, Contexo needs to locate three kinds of build data; The *.bc file, the *.comp file and also the code modules specified within the component file. In the absence of an RSpec, these items needs to be located by searching in paths in the central build system configuration and/or directly under the current directory etc etc. Using an RSpec enables us not only to define an isolated directory layout where these items are located, but also remote and potentially version controlled source locations for all build data.
An RSpec organizes build data locations using the term repository. In the context of an RSpec however, a repository can be more than a version controlled database. A repository can be virtually any location which can be specified with a standard URL, UNC path or Local File System path. Examples:
https://svn.kompany.com/project ftp://customer.void.com/product c:\temp file://c:/dev/projects \scalado\files\transport\joe_builder
An RSpec can point out any number of repositories. It can also import other RSpecs for the purpose of adding and overriding repositories.
An RSpec is defined using XML. The extension for RSpec files is *.rspec.
The root element of an RSpec is ctx-rspec:
<?xml version=“1.0”?> <ctx-rspec> </ctx-rspec>
Each repository is specified by a ctx-repo element:
<?xml version="1.0"?> <ctx-rspec> <ctx-repo id="myRepository"/> </ctx-rspec>
In this minimal example we have a single repository defined with the ID myRepository. When building within the view where this RSpec is located will simply make Contexo look for any build related data it needs within a subdirectory called “myRepository”.
Principally speaking, the following RSpec..:
<?xml version="1.0"?> <ctx-rspec> <ctx-repo id=""/> </ctx-rspec>
…is equivalent to not using any RSpec at all. I.e, the buildsystem tries to locate all build related data directly at the root of the view.
A more practical example:
TODO
We have a local directory we want to use as our View:
c:\dev\