Personal tools
     DOCUMENTATION

Conary:Group Recipe Redirect

From rPath Wiki

Jump to: navigation, search
Conary --> Groups/Packaging --> Group Recipe --> Group Recipe Redirect

A Conary group redirect recipe is a way to point existing users to a completely different set of groups on a (possibly) different label. It can be used for major version updates (for example: updates.example.com@ex:product-3 -> updates.example.com@ex:product-4).

The following example assumes multiple groups making up one appliance. The top-level group is group-product-dist, which in turn contains group-product and group-product-core. All three groups are then redirected to the same group name on the new label: updates.example.com@ex:product-4:

 
class GroupProductDist(RedirectRecipe):
    name = 'group-product-dist'
    version = '0'
 
    def setup(r):
        for x in ['group-product', 'group-product-core', 'group-product-dist']:
            r.addRedirect(x, 'updates.example.com@ex:product-4', fromTrove = x)

In this example, any user updating a system currently on @ex:product-3 will be automatically redirected to the new groups on the new label when upgrading or installing.

If flavors are also different between the source and target of the redirect, such as redirecting from a vmware-flavored group to a non-vmware-flavored group, also add arguments sourceFlavor='vmware is:x86', targetFlavor='~!vmware is:x86'.