Package entropy :: Package client :: Package interfaces :: Module sets :: Class Sets

Class Sets

source code


Entropy Client Package Sets interface. Package sets are (..) sets of package strings that can be referenced using a mnemonic name. For exmaple: the @entropy set is composed by all the packages that are part of the Entropy project (equo, reagent, etc).

Instance Methods
 
__init__(self, entropy_client)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
expand(self, package_set, raise_exceptions=True)
Expand given package set into a set of package matches, recursively.
source code
 
available(self, match_repo=None)
Return a list of available package sets data (list of tuples composed by (repository id [__user__ for use defined set], set name, set content)
source code
 
search(self, package_set, match_repo=None)
Search a package set among available repositories.
source code
 
match(self, package_set, multi_match=False, match_repo=None, search=False)
Match a package set, returning its data.
source code
 
add(self, set_name, set_atoms)
Add a user-defined package set to Entropy Client (changes are permanent)
source code
 
remove(self, set_name)
Remove a user-defined package set from Entropy Client (changes are permanent)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  SET_PREFIX = '@'
Properties

Inherited from object: __class__

Method Details

__init__(self, entropy_client)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

expand(self, package_set, raise_exceptions=True)

source code 

Expand given package set into a set of package matches, recursively.

Parameters:
  • package_set (string) - the package set name (including its "@" prefix)
  • raise_exceptions (bool) - if True, the function is allowed to turn possible warnings (max recursion reached, invalid package set) into errors (raising entropy.exceptions.InvalidPackageSet)
Raises:

available(self, match_repo=None)

source code 
Return a list of available package sets data (list of tuples composed by
   (repository id [__user__ for use defined set], set name, set content)

@keyword match_repo: match given repository identifiers list (if passed)
@type match_repo: tuple
@return: list of available package sets data
@rtype: list

search(self, package_set, match_repo=None)

source code 
Search a package set among available repositories.
Return a list of package sets data (list of tuples composed by
   (repository id [__user__ for use defined set], set name, set content)

@param package_set: package set search term
@type package_set: string
@keyword match_repo: match given repository identifiers list (if passed)
@type match_repo: tuple
@return: list of package sets data
@rtype: list

match(self, package_set, multi_match=False, match_repo=None, search=False)

source code 

Match a package set, returning its data. If multi_match is False (default), data returned will be in tuple form, composed by 3 elements: (repository [__user__ if user defined], set name, list (frozenset) of package names in set). If multi_match is True, a list of tuples (like the one above) will be returned.

Parameters:
  • multi_match (bool) - match across all the repositories and return all the results (not just the best one)
  • match_repo (tuple) - match given repository identifiers list (if passed)
  • search (bool) - use search instead of matching (default is False)

add(self, set_name, set_atoms)

source code 

Add a user-defined package set to Entropy Client (changes are permanent)

Parameters:
  • set_name (string) - package set name
  • set_atoms (list (set)) - list of package names in given set
Raises:

remove(self, set_name)

source code 

Remove a user-defined package set from Entropy Client (changes are permanent)

Parameters:
  • set_name (string) - package set name
Raises: