Table of Contents
When you're creating packages and groups for Conary package management, such as for appliances in rBuilder, you can use the Conary Application Programming Interface (API) Documentation as a reference for the actions you can include as part of each recipe. All recipes start by inheriting from these basic recipe actions, even if you load and use another recipe or superclass.
How can you navigate the Conary API to find all these actions?
No worries. This chapter outlines the recipe actions you can use, along with links to the Conary API Docs for a complete listing of arguments and examples. Use the following sections as a reference, and keep in mind the following important points:
Recipes follow a basic structure, which you can see in each of the recipe templates in Recipe Types and Templates at docs.rpath.com/conary:
# Load a superclass if necessary to bring in extra functions,
# otherwise jump right into your class declaration inheriting from
# Conary's base recipe class PackageRecipe or another class that
# was built on top of it
class ExampleRecipe(PackageRecipe)
# Set the name, version, and any other variables
name = 'example'
version = '1.0'
buildRequires = []
# Define setup(r), unpack(r), or other method as appropriate
# to the superclass/template you're using, passing in the
# "r" parameter
def setup(r):
# Add recipe actions to your setup method
In package recipes, no matter what order your actions appear, they will always occur in this order when you build the package:
Source actions
Build actions
Policy actions
The sections that follow separate out the actions that fall into these three types.
You can use any of these actions in any of your package recipes. However, if you're loading another recipe or superclass, such as those throughout the Recipe Types and Templates at docs.rpath.com/conary, know what actions the superclass has already done for you. Any of the public methods in that superclass are also actions you can use in your recipe, supplementing the Conary actions detailed here.
cvc explain
If you need a quick glance at the API documentation for
a particular recipe action, you don't have to open the
Web pages to find what you want. Just use the
cvc explain command followed by the
recipe action, such as in the following example:
$> cvc explain addSource
Scroll through the documentation as needed to find the information you need, and then press "q" to quit.