Package conary :: Package build :: Module grouprecipe :: Class GroupRecipe
[hide private]
[frames] | no frames]

Class GroupRecipe

source code

   object --+        
            |        
recipe.Recipe --+    
                |    
 _BaseGroupRecipe --+
                    |
                   GroupRecipe
Known Subclasses:
explain.DummyGroupRecipe

NAME

r.GroupRecipe() - Provides the recipe interface for creating a group.

SYNOPSIS

See USER COMMANDS Section

DESCRIPTION

The r.GroupRecipe class provides the interface for creation of groups in a Conary recipe. A group refers to a collection of troves; the troves may be related in purpose to provide a useful functionality, such as a group of media-related troves to provide encoding, decoding, and playback facilities for various media, for example. Groups are not required to consist of troves with related functionality however, and may contain a collection of any arbitrary troves.

Most r.GroupRecipe user commands accept a groupName parameter. This parameter specifies the group a particular command applies to. For example, r.add('foo', groupName='group-bar') attempts to add the trove foo to the group group-bar.

The group specified by groupName must exist, or be created before troves may be added to it. The groupName parameter may also be a list of groups in which case the command will be applied to all groups. If groupName is not specified, or is None, then the command will apply to the current default group.

PARAMETERS

Several parameters may be set at the time of group creation. Although these parameters are typically passed to r.createGroup() for the base group, they should be set as variables in the recipe class.

Note: Setting these parameters affects not only the value for the base group, but also the default value for all newly created groups. For example, if autoResolve is set to True in the base group, all other groups created will have autoResolve set to True by default. imageGroup is an exception to this rule; it will not propogate to sub groups.

The following parameters are accepted by r.GroupRecipe with default values indicated in parentheses when applicable:

depCheck : (False) If set to True, Conary will check for dependency closure in this group, and raise an error if closure is not found.

autoResolve : (False) If set to True, Conary will include any extra troves needed to make this group dependency complete.

checkOnlyByDefaultDeps : (True) Conary only checks the dependencies of troves that are installed by default, referenced in the group. If set to False, Conary will also check the dependencies of byDefault False troves. Doing this, however, will prevent groups with autoResolve=True from changing the byDefault status of required troves.

checkPathConflicts : (True) Conary checks for path conflicts in each group by default to ensure that the group can be installed without path conflicts. Setting this parameter to False will disable the check.

imageGroup | (True) Indicates that this group defines a complete, functioning system, as opposed to a group representing a system component or a collection of multiple groups that might or might not collectively define a complete, functioning system. Image group policies will be executed separately for each image group. This setting is recorded in the troveInfo for the group. This setting does not propogate to subgroups.

USER COMMANDS

The following user commands are applicable in Conary group recipes:

Nested Classes [hide private]

Inherited from _BaseGroupRecipe: basePolicyClass

Instance Methods [hide private]
 
__init__(self, repos, cfg, label, flavor, laReposCache, srcdirs=None, extraMacros={}, lightInstance=False) source code
 
_findSources(self, repos, callback=None)
Method used to find all of the source components that would need to be built to build this group, including their flavor.
source code
 
_getSearchSource(self, ref=None, troveSource=None) source code
 
_parseFlavor(self, flavor) source code
 
Requires(self, requirement, groupName=None)
r.Requires() - Defines a runtime requirement for group
source code
 
add(self, name, versionStr=None, flavor=None, source=None, byDefault=None, ref=None, components=None, groupName=None, use=True, labelPath=None, searchPath=None, requireLatest=None)
r.add() - Adds a trove to a group
source code
 
addTrove(self, name, versionStr=None, flavor=None, source=None, byDefault=None, ref=None, components=None, groupName=None, use=True, labelPath=None, searchPath=None, requireLatest=None)
r.add() - Adds a trove to a group
source code
 
remove(self, name, versionStr=None, flavor=None, groupName=None, allowNoMatch=False)
r.remove() - Removes a trove
source code
 
removeComponents(self, componentList, groupName=None)
r.removeComponents() - Define components which should not be installed by default
source code
 
moveComponents(self, componentList, fromGroup, toGroup, byDefault=None)
r.moveComponents() - Add components to one group, removing them from the other in the process.
source code
 
copyComponents(self, componentList, fromGroupName, toGroupName, byDefault=None)
r.copyComponents() - Add components to one group by copying them from the components in another group.
source code
 
setSearchPath(self, *path)
r.setSearchPath() - Specify the searchPath to search for troves
source code
 
setByDefault(self, byDefault=True, groupName=None)
r.setByDefault() - Set troves to be added to group by default
source code
 
addAll(self, name, versionStr=None, flavor=None, ref=None, recurse=None, groupName=None, use=True, searchPath=None, flatten=False, copyScripts=False, copyCompatibilityClass=False, requireLatest=None)
r.addAll() - Add all troves directly contained in a given reference to groupName
source code
 
removeItemsAlsoInNewGroup(self, name, groupName=None, use=True)
r.removeItemsAlsoInNewGroup() - removes troves in the group specified that are also in the current group.
source code
 
removeItemsAlsoInGroup(self, name, versionStr=None, flavor=None, groupName=None, searchPath=None, use=True)
r.removeItemsAlsoInGroup() - removes troves in the group specified that are also in the current group.
source code
 
addCopy(self, name, versionStr=None, flavor=None, ref=None, recurse=True, groupName=None, use=True, searchPath=None, flatten=False, copyScripts=True, copyCompatibilityClass=True, requireLatest=None)
r.addCopy() - Create a copy of name and add that copy to groupName.
source code
 
addNewGroup(self, name, groupName=None, byDefault=True, use=True)
r.addNewGroup() - Adds one newly created group to another newly created group
source code
 
setDefaultGroup(self, groupName)
r.setDefaultGroup() - Defines default group
source code
 
addResolveSource(self, name, versionStr=None, flavor=None, ref=None, use=True)
r.addResolveSource() - Specify alternate source for dependency resolution
source code
 
addReference(self, name, versionStr=None, flavor=None, ref=None)
r.addReference - Adds a reference to a trove
source code
 
replace(self, name, newVersionStr=None, newFlavor=None, ref=None, groupName=None, allowNoMatch=False, searchPath=None, requireLatest=None)
r.replace() - Replace troves
source code
 
iterReplaceSpecs(self) source code
 
setLabelPath(self, *path)
r.setLabelPath() - Specify the labelPath to search for troves
source code
 
_addScript(self, contents, groupName, scriptName, fromClass=None) source code
 
setCompatibilityClass(self, theClass, groupName=None)
r.setCompatibilityClass() - Specify the compatibility class for this trove.
source code
 
getLabelPath(self) source code
 
getSearchPath(self) source code
 
getResolveTroveSpecs(self) source code
 
getSearchFlavor(self) source code
 
getChildGroups(self, groupName) source code
 
getGroupMap(self) source code
 
startGroup(self, name, depCheck=False, autoResolve=None, byDefault=None, checkOnlyByDefaultDeps=None, checkPathConflicts=None, imageGroup=False, groupName=None)
r.startGroup() - Creates a new group, and sets it as the default group.
source code
 
createGroup(self, groupName, depCheck=False, autoResolve=None, byDefault=None, checkOnlyByDefaultDeps=None, checkPathConflicts=None, imageGroup=False)
r.createGroup() - Creates a new group
source code

Inherited from _BaseGroupRecipe: getGroupDict, getGroupNames, getPrimaryGroupNames, iterGroupList, loadSourceActions, troveFilter

Inherited from recipe.Recipe: __getattr__, __repr__, doProcess, extraSource, fetchAllSources, fetchLocalSources, getSourcePathList, isCrossCompileTool, loadPolicy, move, populateLcache, prepSources, recordCalls, recordMove, sourceMap, unpackSources, validate

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Methods [hide private]

Inherited from recipe.Recipe: getType, validateClass

Class Variables [hide private]
  Flags = Flags: {}
  internalAbstractBaseClass = 1
  _recipeType = 3
  depCheck = False
  autoResolve = None
  imageGroup = True
  checkOnlyByDefaultDeps = True
  checkPathConflicts = True
  requireLatest = True

Inherited from _BaseGroupRecipe: internalPolicyModules

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, repos, cfg, label, flavor, laReposCache, srcdirs=None, extraMacros={}, lightInstance=False)
(Constructor)

source code 
Overrides: _BaseGroupRecipe.__init__

Requires(self, requirement, groupName=None)

source code 
r.Requires() - Defines a runtime requirement for group

SYNOPSIS

r.Requires(requirement, [groupName])

DESCRIPTION

The r.Requires command causes a group to have a runtime requirement of the trove requirement.

PARAMETERS

The r.Requires() command accepts the following parameters, with default values shown in parentheses:

requirement : (None) Specifies the group runtime requirement

groupName : (None) The name of the group to affect

EXAMPLES

r.Requires('tmpwatch')

Uses r.Requires to specify that the trove tmpwatch must be installed in order for the group to be installed.

add(self, name, versionStr=None, flavor=None, source=None, byDefault=None, ref=None, components=None, groupName=None, use=True, labelPath=None, searchPath=None, requireLatest=None)

source code 
r.add() - Adds a trove to a group

SYNOPSIS

r.add(name, [versionStr,] [flavor,] [source,] [byDefault,] [ref,] [requireLatest,] [components,] [groupName,] [searchPath])

DESCRIPTION

The r.add() command is used to add a trove to a group.

PARAMETERS

The r.add() command accepts the following parameters, with default values shown in parentheses:

byDefault : (None, or value of createGroup) Specifies whether to include a trove by default. Defaults to the byDefault setting as defined with createGroup.

components : (None) Specify a set of trove components to include. Only relevant when adding packages. Specified as a list, such as r.add('foo', components=['runtime', 'lib']).

flavor : (None) A flavor limiter such as that passed to repquery which determines the trove returned.

groupName : (None) The group to add trove to.

name : (None) Specifies the name of trove to add- This parameter is required.

source : (None) Specifies the source from which this trove originates for programs which read group recipes. This parameter's explicit use is generally unnecessary.

versionStr : (None) A version specifier like that passed to

repquery which determines the trove returned.

requireLatest : Raise an error if add resolves to an older trove than the latest on branch. This can occur when a flavor of a trove exists that is not the latest version.

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are added to the group

searchPath : (None) Set a specific searchPath to search for this particular trove. This overrides the ref flag. See setSearchPath for a description of how the searchPath works.

EXAMPLES

r.add('gzip:runtime')

Adds the gzip:runtime trove to the current group.

addTrove(self, name, versionStr=None, flavor=None, source=None, byDefault=None, ref=None, components=None, groupName=None, use=True, labelPath=None, searchPath=None, requireLatest=None)

source code 
r.add() - Adds a trove to a group

SYNOPSIS

r.add(name, [versionStr,] [flavor,] [source,] [byDefault,] [ref,] [requireLatest,] [components,] [groupName,] [searchPath])

DESCRIPTION

The r.add() command is used to add a trove to a group.

PARAMETERS

The r.add() command accepts the following parameters, with default values shown in parentheses:

byDefault : (None, or value of createGroup) Specifies whether to include a trove by default. Defaults to the byDefault setting as defined with createGroup.

components : (None) Specify a set of trove components to include. Only relevant when adding packages. Specified as a list, such as r.add('foo', components=['runtime', 'lib']).

flavor : (None) A flavor limiter such as that passed to repquery which determines the trove returned.

groupName : (None) The group to add trove to.

name : (None) Specifies the name of trove to add- This parameter is required.

source : (None) Specifies the source from which this trove originates for programs which read group recipes. This parameter's explicit use is generally unnecessary.

versionStr : (None) A version specifier like that passed to

repquery which determines the trove returned.

requireLatest : Raise an error if add resolves to an older trove than the latest on branch. This can occur when a flavor of a trove exists that is not the latest version.

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are added to the group

searchPath : (None) Set a specific searchPath to search for this particular trove. This overrides the ref flag. See setSearchPath for a description of how the searchPath works.

EXAMPLES

r.add('gzip:runtime')

Adds the gzip:runtime trove to the current group.

remove(self, name, versionStr=None, flavor=None, groupName=None, allowNoMatch=False)

source code 
r.remove() - Removes a trove

SYNOPSIS

r.remove(name, [flavor,] [groupName,] [versionStr], [allowNoMatch])

DESCRIPTION

The r.remove command removes a trove from the group which was previously added with r.addAll or add commands.

Note: If the trove is not included explicitly, such as by r.add(), but rather implicitly, as a component in a package which has been added, then removing the trove only changes its byDefault setting, so that installing this group will not install the trove.

Troves present due to an included subgroup can be removed from a supergroup. For example, the group group-os is a top level group, and includes group-dist, which in turn, includes package foo.

Using r.remove('foo', groupName='group-os') prevents installation of package foo during the installation of the group group-os.

PARAMETERS

The r.remove() command accepts the following parameters, with default values shown in parentheses:

flavor : (None) A flavor limiter such as that passed to repquery which determines the trove returned.

groupName : (None) The name of the group to remove trove from

name : (None) The name of the trove to be removed. This parameter is required.

versionStr : (None) A version specifier like that passed to repquery which determines the trove returned.

allowNoMatch : (False) Silences the warning output if this remove did not match anything.

EXAMPLES

r.remove('kernel:configs', flavor='kernel.smp')

Removes the trove kernel:configs from the current group for the flavor kernel.smp.

removeComponents(self, componentList, groupName=None)

source code 
r.removeComponents() - Define components which should not be installed by default

SYNOPSIS

r.removeComponents(componentList, [groupName])

DESCRIPTION

The r.removeComponents command specifies components which should not be installed by default when installing the group.

PARAMETERS

The r.removeComponents() command accepts the following parameters, with default values shown in parentheses:

componentList : (None) A list of components which should not be installed by default when the group is installed

groupName : (None) The name of the group to affect

EXAMPLES

r.removeComponents(['devel', 'devellib'])

Uses r.RemoveComponents to specify that the :devel and :devellib components should not be installed by default.

moveComponents(self, componentList, fromGroup, toGroup, byDefault=None)

source code 
r.moveComponents() - Add components to one group, removing them from the other in the process.

SYNOPSIS

r.moveComponents(componentList, fromGroup, toGroup, [byDefault])

DESCRIPTION

The r.moveComponents removes components from the fromGroup, and adds those components to the toGroup.

PARAMETERS

The r.moveComponents() command accepts the following parameters, with default values shown in parentheses where there is one:

componentList : A list of components which should be moved from fromGroup to toGroup. Example: ['devel', 'devellib']

fromGroup : The name of the group to move the components from

toGroup : The name of the group to move the components to

byDefault : (None) When specified, this ensures that all the components that are added have the byDefault value specified (either True or False). If not specified, the components get the byDefault value they had in the fromGroup.

EXAMPLES

r.moveComponents(['devel', 'devellib'], 'group-core', 'group-devel')

Uses r.moveComponents to specify that those :devel and :devellib components that exist in group-core should be removed from group-core and added to group-devel.

copyComponents(self, componentList, fromGroupName, toGroupName, byDefault=None)

source code 
r.copyComponents() - Add components to one group by copying them from the components in another group.

SYNOPSIS

r.copyComponents(componentList, fromGroup, toGroup, [byDefault])

DESCRIPTION

The r.copyComponents copies the listed component types from the fromGroup to the toGroup.

PARAMETERS

The r.copyComponents() command accepts the following parameters, with default values shown in parentheses where there is one:

componentList : A list of components which should be copied from fromGroup to toGroup. Example: ['devel', 'devellib']

fromGroup : The name of the group to copy the components from

toGroup : The name of the group to copy the components to

byDefault : (None) When specified, this ensures that all the components that are added have the byDefault value specified (either True or False). If not specified, the components get the byDefault value they had in the fromGroup.

EXAMPLES

r.copyComponents(['devel', 'devellib'], 'group-core', 'group-devel')

Uses r.copyComponents to specify that those :devel and :devellib components that exist in group-core should be added to group-devel.

setSearchPath(self, *path)

source code 
r.setSearchPath() - Specify the searchPath to search for troves

SYNOPSIS

r.setSearchPath(pathspec)

DESCRIPTION

The r.setSearchPath command specifies the searchPath used to search for troves.

SearchPaths can currently consist of two types of items: labels and troves. Labels must be of the form <host>@<namespace>:<tag>, while troves are of the form <name>[=version][[flavor]].

For example, a label might be myproject.rpath.org@rpl:1, while a trove may be specified as:
   group-dist, or group-dist=1.0, or group-dist=:1[!xen], or
   group-dist=/myproject.rpath.org@rpl:1/1.0-1-1.

More formats for troves are allowed as well, see troveSpec documentation for the full list of allowable specifications for troves.

setSearchPath will also determine how dependency resolution is done when using autoResolve. Dependency resolution will use the same search path specified here.

AddResolutionSource (deprecated) overrides setSearchPath's control of dependency resolution. If you use addResolutionSource, setSearchPath will only control the search path for adding troves.

PARAMETERS

The r.setSearchPath() command accepts the following parameters, with default values shown in parentheses:

pathspec : (None) The path to set as searchPath

EXAMPLES

r.setSearchPath('myproject.rpath.org@rpl:1', 'group-dist=conary.rpath.com@rpl:1')

Uses r.setSearchPath to specify troves are to be sought in the label myproject.rpath.org@rpl:1 first, and then fallback to searching the group group-dist=conary.rpath.com@rpl:1.

setByDefault(self, byDefault=True, groupName=None)

source code 
r.setByDefault() - Set troves to be added to group by default

SYNOPSIS

r.setByDefault(byDefault, [groupName])

DESCRIPTION

The r.setByDefault command specifies whether troves are added to the group by default.

PARAMETERS

The r.setByDefault() command accepts the following parameters, with default values shown in parentheses:

byDefault : (Current group setting) Whether to add troves to this group byDefault True, or byDefault False by default.

groupName : (None) The name of the group to affect

EXAMPLES

r.setByDefault(False, groupName='group-ftools')

Specifies troves are not added to the group group-ftools by default.

addAll(self, name, versionStr=None, flavor=None, ref=None, recurse=None, groupName=None, use=True, searchPath=None, flatten=False, copyScripts=False, copyCompatibilityClass=False, requireLatest=None)

source code 
r.addAll() - Add all troves directly contained in a given reference to groupName

SYNOPSIS

r.addAll(name, [versionStr], [flavor,] [ref,] [requireLatest,] [recurse,] [groupName,] [use,] [searchPath,] [flatten,] [copyScripts,] [copyCompatibilityClass])

DESCRIPTION

The r.addAll() command is used to add all troves directly contained in a given reference to name to the recipe.

For example, if the cooked group-foo contains references to the troves foo1=<version>[flavor], and foo2=<version>[flavor], the entries followed by r.addAll(name, versionStr, flavor) would be equivalent to adding the r.add lines:

r.add('foo1', <version>) r.add('foo2', <version>).

PARAMETERS

The r.addAll() command accepts the following parameters, with default values shown in parentheses:

groupName : (None) The group to add trove to

recurse : (True) If True, and the trove you specify with addAll contains groups, new groups will be created in the recipe that match those contained groups, and the r.addAll() command is recursed on those groups.

Note: If the subgroups already exist in the group, those preexisting groups will be used. Otherwise, the default settings will be used when creating any new groups.

searchPath: (None) searchPath to search in for this trove. See r.setSearchPath() for more information.

flatten: (False) If True, acts like recurse=True but removes any intermediate groups. So if group-os includes group-dist, which includes group-core, which includes openssh, you can use addAll('group-os', flatten=True) to add openssh to your group.

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are added to the group

copyScripts: (False) When True the scripts attached to the group being copied are attached to this group.

copyCompatibilityClass: (False) When True the compatibility class for this group is set based on the class of the group being copied.

ref: (None) (deprecated) Trove reference to search in for this trove. See r.addReference() for more information.

requireLatest : Raise an error if addAll resolves to an older trove than the latest on branch. This can occur when a flavor of a trove exists that is not the latest version.

EXAMPLES

r.addAll('group-core', 'conary.rpath.com@rpl:1')

Uses r.addAll to add the troves referenced by group-core to the recipe for version string 'conary.rpath.com@rpl:1'.

removeItemsAlsoInNewGroup(self, name, groupName=None, use=True)

source code 
r.removeItemsAlsoInNewGroup() - removes troves in the group specified that are also in the current group.

SYNOPSIS

r.removeItemsAlsoInNewGroup(name, [groupName,])

DESCRIPTION

The r.removeItemsAlsoInNewGroup() command is used to remove a set of troves from the current group. The first group name specified is the set of troves to remove, the second group name specified is the group to remove troves from (the current default group is used if the second group name is not specified).

All troves in the first group are removed from the second group. This can be compared to the "difference" operation in when using sets.

For example, if the cooked group-foo contains references to the troves foo1=<version>[flavor], and foo2=<version>[flavor], and the current group contains references to the troves foo1=<version>[flavor], and foo3=<version>[flavor], r.removeItesAlsoInNewGroup would remove foo1 from the current group.

PARAMETERS

The r.removeItemsAlsoInNewGroup() command accepts the following parameters, with default values shown in parentheses:

name : (Required) The group that contains the trove to remove

groupName : (None) The group to remove troves from (default current)

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are removed from the group

EXAMPLES

r.removeItemsAlsoInNewGroup('group-core', groupName='group-extras')

Removes troves from group-extras if they are contained in group-core. (group-core must be another group defined in this recipe.)

removeItemsAlsoInGroup(self, name, versionStr=None, flavor=None, groupName=None, searchPath=None, use=True)

source code 
r.removeItemsAlsoInGroup() - removes troves in the group specified that are also in the current group.

SYNOPSIS

r.removeItemsAlsoInGroup(name, [versionStr], [flavor,] [groupName,] [searchPath,])

DESCRIPTION

The r.removeItemsAlsoInGroup() command is used to remove a set of troves from the current group. The first group name specified is the set of troves to remove, the second group name specified is the group to remove troves from (the current default group is used if the second group name is not specified).

All troves in the first group are removed from the second group. This can be compared to the "difference" operation in when using sets.

For example, if the cooked group-foo contains references to the troves foo1=<version>[flavor], and foo2=<version>[flavor], and the current group contains references to the troves foo1=<version>[flavor], and foo3=<version>[flavor], r.removeItesAlsoInNewGroup would remove foo1 from the current group.

PARAMETERS

The r.removeItemsAlsoInNewGroup() command accepts the following parameters, with default values shown in parentheses:

name : (Required) The group that contains the troves to remove

groupName : (None) The group to remove troves from (default current)

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are removed from the group

searchPath: (None) searchPath to search in for the group that contains the troves to remove. See r.setSearchPath() for more information.

EXAMPLES

r.removeItemsAlsoInGroup('group-core', 'conary.rpath.com@rpl:1', groupName='group-extras')

Removes troves from group-extras if they are contained in group-core. (group-core must already be cooked and exist at conaryr.rpath.com@rpl:1)

addCopy(self, name, versionStr=None, flavor=None, ref=None, recurse=True, groupName=None, use=True, searchPath=None, flatten=False, copyScripts=True, copyCompatibilityClass=True, requireLatest=None)

source code 
r.addCopy() - Create a copy of name and add that copy to groupName.

SYNOPSIS

r.addCopy(name, [flavor,] [groupName,] [recurse,] [ref,] [requireLatest,] [versionStr,] [copyScripts,] [copyCompatibilityClass])

DESCRIPTION

The r.addCopy() command is used to create a copy of the group with name name and add that group to groupName.

For example, if the cooked group-foo contains references to the troves foo1=<version>[flavor], and foo2=<version>[flavor], the entries followed by r.addCopy('group-foo') would be equivalent to adding the r.add lines:

r.createGroup('group-foo') r.add('foo1', <version>, groupName='group-foo') r.add('foo2', <version>, groupName='group-foo') r.addNewGroup('group-foo').

PARAMETERS

The r.addCopy() command accepts the following parameters, with default values shown in parentheses:

groupName : (None) The group to add the copy to.

recurse : (True) If True, and the trove you specify with addCopy contains groups, new groups will be created in the recipe that match those contained groups, and the r.addCopy() command is recursed on those groups.

Note: If the subgroups already exist in the group, those preexisting groups will be used. Otherwise, the default settings will be used when creating any new groups.

copyScripts: (True) When True the scripts attached to the groups being copied are attached to the newly created groups.

copyCompatibilityClass: (True) When True the compatibility class for the newly created groups are set to the compatibility classes from the groups being copied.

ref: (None) (Deprecated) Trove reference to search in for this trove. See r.addReference() for more information.

requireLatest : Raise an error if addCopy resolves to an older trove than the latest on branch. This can occur when a flavor of a trove exists that is not the latest version.

searchPath: (None) searchPath to search in for this trove. See r.setSearchPath() for more information.

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are added to the group

EXAMPLES

r.addCopy('group-core', 'conary.rpath.com@rpl:1')

Uses r.addCopy to create a new group called group-core, copy all the troves from the old group-core to the new group, and then add the new group-core to the current group.

addNewGroup(self, name, groupName=None, byDefault=True, use=True)

source code 
r.addNewGroup() - Adds one newly created group to another newly created group

SYNOPSIS

r.addNewGroup(name, [byDefault,] [groupName])

DESCRIPTION

The r.addNewGroup() command is used to add one newly created group to another newly created group.

PARAMETERS

The r.addNewGroup() command accepts the following parameters, with default values shown in parentheses:

name : (None) The name of group to add

byDefault: (True) Whether to add this group by default.

groupName : (Current group name) The name(s) of group(s) to add this trove to.

use: (True) A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the trove(s) are added to the group

EXAMPLES

r.addNewGroup('group-3d', groupName='group-graphics')

Adds the group group-3d to the group group-graphics.

setDefaultGroup(self, groupName)

source code 
r.setDefaultGroup() - Defines default group

SYNOPSIS

r.setDefaultGroup(groupName)

DESCRIPTION

The r.setDefaultGroup command specifies the current group which all commands will apply to if no groupName is specified as a parameter to a given command.

PARAMETERS

The r.setDefaultGroup() command accepts the following parameters, with default values shown in parentheses:

groupName : (None) The name of the group to specify as the default.

EXAMPLES

r.setDefaultGroup('group-consmod')

Defines the default group as group-consmod.

addResolveSource(self, name, versionStr=None, flavor=None, ref=None, use=True)

source code 
r.addResolveSource() - Specify alternate source for dependency resolution

SYNOPSIS

r.addResolveSource(name, [versionStr], [flavor], [ref])

DESCRIPTION

The r.addResolveSource command adds a resolution source for resolving dependencies. When you specify a resolve source, that source will be searched for dependencies, and your labelPath will not be searched. If you do not specify r.addResolveSource lines, then your labelPath will be searched dependency resolution.

NOTE: Using r.addResolveSource does not imply autoResolve, since autoResolve is a per-group option and addResolveSource is globally defined

PARAMETERS

The r.addResolveSource() command accepts the following parameters, with default values shown in parentheses:

name : (None) The name of the reference to add

versionStr : (None) A version specifier like that passed to

flavor : (None) A flavor limiter such as that passed to repquery which determines the trove returned.

ref : (None) Trove reference to search for this trove in. See r.addReference for more information.

EXAMPLES

r.addResolveSource('foo.example.com@foo:devel')

Uses r.addResolveSource to specify dependency resolution should be performed against the labelPath foo.example.com@foo:devel

addReference(self, name, versionStr=None, flavor=None, ref=None)

source code 
r.addReference - Adds a reference to a trove

SYNOPSIS

r.addReference(name, [flavor,] [ref,] [versionStr])

DESCRIPTION

The r.addReference command adds a reference to a trove, (usually a group trove) which may then be passed to future invocations of r.add or r.addAll commands as the reference parameter.

Passing in a reference will cause affected commands to search for the trove to be added in the reference.

PARAMETERS

The r.addReference() command accepts the following parameters, with default values shown in parentheses:

flavor : (None) A flavor limiter such as that passed to repquery which determines the trove returned.

name : (None) The name of the reference to add

ref : (None) Trove reference to search for this trove in. See r.addReference for more information.

versionStr : (None) A version specifier like that passed to repquery which determines the trove returned.

EXAMPLES

coreRef = r.addReference('group-core', 'conary.rpath.com@rpl:1') r.add('tmpwatch', ref=coreRef)

Uses r.addReference to Define coreRef as a reference to the group-trove group-core for version string 'conary.rpath.com@rpl:1', and then uses an r.add invocation to add tmpwatch using the coreRef reference.

replace(self, name, newVersionStr=None, newFlavor=None, ref=None, groupName=None, allowNoMatch=False, searchPath=None, requireLatest=None)

source code 
r.replace() - Replace troves

SYNOPSIS

r.replace(name, [groupName,] [newFlavor,] [newVersionStr], [allowNoMatch], [searchPath])

DESCRIPTION

The r.replace command replaces all troves with a particular name with a new version of the trove.

Note: By default, r.replace() affects all groups; this behavior is different from other group commands.

PARAMETERS

The r.replace() command accepts the following parameters, with default values shown in parentheses:

name : (None) Specify name of the trove to replace

groupName : (None) The name of the group to affect

newFlavor : (None) The new flavor to add

newVersionStr : (None) The new version to add

ref : (None) The trove reference to search for the trove in

allowNoMatch : (False) Silences the warning output if this replace did not match anything.

searchPath : (None) Set a specific searchPath to search for this particular trove. This overrides the ref flag. See setSearchPath for a description of how the searchPath works.

EXAMPLES

r.replace('distro-release')

Uses r.replace to remove all instances of the distro-release trove, and replaces them with a new version of distro-release.

setLabelPath(self, *path)

source code 
r.setLabelPath() - Specify the labelPath to search for troves

SYNOPSIS

r.setLabelPath(pathspec)

DESCRIPTION

The r.setLabelPath command specifies the labelPath used to search for troves.

PARAMETERS

The r.setLabelPath() command accepts the following parameters, with default values shown in parentheses:

pathspec : (None) The path to set as labelPath

EXAMPLES

r.setLabelPath('myproject.rpath.org@rpl:1', 'conary.rpath.com@rpl:1')

Uses r.setLabelPath to specify troves are to be sought in the LabelPaths 'myproject.rpath.org@rpl:1' and 'conary.rpath.com@rpl:1'.

setCompatibilityClass(self, theClass, groupName=None)

source code 
r.setCompatibilityClass() - Specify the compatibility class for this trove.

SYNOPSIS

r.setCompatibilityClass(class)

DESCRIPTION

The r.setCompatibilityClass command specifies the compatibility class for this trove. When a trove is updated from one compatibility class to another, the rollback stack is invalidated unless the newly-installed trove provides a postRollback script which supports the old trove's compatibility class.

PARAMETERS

The r.setCompatibilityClass() command accepts the following parameters.

theClass : The compatibility class for this trove.

startGroup(self, name, depCheck=False, autoResolve=None, byDefault=None, checkOnlyByDefaultDeps=None, checkPathConflicts=None, imageGroup=False, groupName=None)

source code 
r.startGroup() - Creates a new group, and sets it as the default group.

SYNOPSIS

r.startGroup(name, [autoResolve,] [byDefault,] [checkOnlyByDefaultDeps,] [checkPathConflicts,] [depCheck,] [groupName,] [imageGroup])

DESCRIPTION

The r.startGroup command starts a new group. This command aggregates createNewGroup, addNewGroup and setDefaultGroup.

PARAMETERS

The r.startGroup() command accepts the following parameters, with default values shown in parentheses:

name : (None) The name of the group to be created. Must start with 'group-'.

autoResolve : (False) Whether to resolve dependencies for this group.

byDefault : whether or not to add the newly created group byDefault True, or byDefault False. This setting does not affect the default byDefault setting of the newly created group.

checkOnlyByDefaultDeps : (Current group setting) Whether to include byDefault False troves in this group.

checkPathConflicts : (Current group setting) Whether to check path conflicts for this group.

depCheck : (False) Whether to check for dependency closure for this group.

groupName : (None) The name of the parent group to add the newly created group to.

imageGroup : (False) Designate that this group is a image group. Image Group policies will be executed separately on this group.

EXAMPLES

r.startGroup('group-ftools')

Creates the group group-ftools.

r.startGroup('group-multiplay', autoResolve=False)

Creates the group group-multiplay and specifies no dependencies are resolved automatically for this group.

createGroup(self, groupName, depCheck=False, autoResolve=None, byDefault=None, checkOnlyByDefaultDeps=None, checkPathConflicts=None, imageGroup=False)

source code 
r.createGroup() - Creates a new group

SYNOPSIS

r.createGroup(groupName, [autoResolve,] [byDefault,] [checkOnlyByDefaultDeps,] [checkPathConflicts,] [depCheck,] [imageGroup])

DESCRIPTION

The r.createGroup command creates a new group.

PARAMETERS

The r.createGroup() command accepts the following parameters, with default values shown in parentheses:

autoResolve : (False) Whether to resolve dependencies for this group.

byDefault : (Current group setting) Whether to add troves to this group byDefault True, or byDefault False by default.

checkOnlyByDefaultDeps : (Current group setting) Whether to include byDefault False troves in this group.

checkPathConflicts : (Current group setting) Whether to check path conflicts for this group.

depCheck : (False) Whether to check for dependency closure for this group.

groupName : (None) The name of the group to be created. Must start with 'group-'.

imageGroup : (False) Designate that this group is a image group. Image Group policies will be executed separately on this group.

EXAMPLES

r.createGroup('group-ftools')

Creates the group group-ftools.

r.createGroup('group-multiplay', autoResolve=False)

Creates the group group-multiplay and specifies no dependencies are resolved automatically for this group.