Difference between revisions of "Platform Team/Guide/Sweets Packaging"
Line 43: | Line 43: | ||
* ''?'' matches any single character, except directory separator | * ''?'' matches any single character, except directory separator | ||
* ''**'' matches everything, including directory separator | * ''**'' matches everything, including directory separator | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Revision as of 08:49, 24 December 2010
NOTICE: This page is a draft in active flux... Please contribute to these contents and discuss issues on the discussion page. |
Writing recipe files
See also recipe specification.
Package names
Within recipe files, Zero packages might be identified by several methods:
- current package (instead of a direct slug value, to make the recipe file more robust, move the slug option to the [DEFAULT] section and use
%(slug)s
interpolation),
<current-slug>[/<sub-package>]
- other packages from Bazaar that are accessible in the current project,
<other-package-slug>[/<sub-package>]
- direct 0install link.
<0install-feed-url>
At the end, all links will be transfered to 0install feed urls. The final 0install url will be in the following format:
http://sweets.sugarlabs.org/<Bazaar-project>/<slug>
Versioning
The versioning scheme for Zero packages can be arbitrary, since the version recipe option supports 0install version format. But in some cases, e.g., libraries, stricter versioning could be useful. In that case, the age recipe option should be used.
The recipe option age is intended to support, mostly, API breakages of library packages. But not ABI, because tracking an ABI is not trivial within the Sugar ecosystem (due to the enormous potential code base of varying quality) and of little utility, and since packages may at any time be rebuilt from sources and multiple library versions may be installed (thanks to 0install).
Using the age option is simple, on every API breakage for the library package, increment the age value. The final package version will be:
<age-option>.<version-option>
Glob patterns
A pattern could be of two types:
- doesn't contain / or ** substrings, will be applied only to file names
- contains / or ** substring, will be applied to the full file path (relative to the root), thus could affect several directory levels
Only these pattern symbols are allowed:
- * matches everything, except directory separator
- ? matches any single character, except directory separator
- ** matches everything, including directory separator