Table of Contents
A factory is a special type of Conary recipe used to generate other recipes. Conary developers created factories so that tools like rBuilder's Package Creator could automatically determine what kind of recipe was needed to package a given piece of software.
How does it work?
Conary enjoys the object oriented benefits of the Python programming language. For recipe code, this means you can chain together any code you need to build your recipe. This means that any code you will reuse in two or more packages (or groups) can be maintained in its own recipe class and called by the packages (or groups) that need it.
When you create a new package (or group) for Conary to use a factory, your new recipe automatically inherits all of the code from the factory recipe class. You can create a manifest file that the factory parses to determine where your applications files reside. In many cases, this manifest file is all you'll need for your package; the CONARY state file has information that will do the rest when you build the package. If your target package needs some additional actions to override or supplement the factory actions, you can write a brief package recipe for that target package with just the code you need for those actions.
This document assumes that you have Conary packaging experience, or that you have another instructional reference such as rBuilder Packaging and Automation from docs.rpath.com.
You can use factories developed and maintained by rPath, and you can create develop and use your own factories. Use the following sections as a guide to finding, using, and developing factories.