pkgcore.repository.util module

class pkgcore.repository.util.RepositoryGroup(repos=(), combined=None)[source]

Bases: DictMixin

Group of repos as a single unit.

Args:

repos (iterable): repo instances combined: combined repo, if None a multiplex repo is created

classmethod change_repos(repos)[source]
property has_match

alias to combined.has_match

items() a set-like object providing a view on D's items[source]
property itermatch

alias to combined.itermatch

keys() a set-like object providing a view on D's keys[source]
property match

alias to combined.match

property path_restrict

alias to combined.path_restrict

property real
repo_match(path)[source]

Find the repo containing a path.

Args:

path (str): path in the filesystem

Returns:

repo object if a matching repo is found, otherwise None.

values() an object providing a view on D's values[source]
property virtual
class pkgcore.repository.util.SimpleTree(cpv_dict, pkg_klass=<class 'pkgcore.ebuild.cpv.VersionedCPV'>, livefs=False, frozen=True, repo_id=None)[source]

Bases: tree

in-memory repository used for testing or simple shims.

notify_add_package(pkg)[source]

internal function

notify the repository that a pkg is being added to it

notify_remove_package(pkg)[source]

internal function

notify the repository that a pkg it provides is being removed

pkgcore.repository.util.get_raw_repos(repos)[source]

Returns a list of raw repos found.

repos can be either a repo instance, or a list of repos

pkgcore.repository.util.get_virtual_repos(repos, sentinel=True)[source]

Select only virtual repos.

repos can be either a list of repos, or a repo to descend through. if sentinel is False, will select all non virtual repos