pkgcore.repository.prototype module¶
base repository template
- class pkgcore.repository.prototype.CategoryLazyFrozenSet(get_values: Callable[[], Iterable[str]])[source]¶
Bases:
object
Lazy frozenset for holding categories
- class pkgcore.repository.prototype.PackageMapping(parent_mapping, pull_vals)[source]¶
Bases:
DictMixin
- class pkgcore.repository.prototype.VersionMapping(parent_mapping, pull_vals)[source]¶
Bases:
DictMixin
- class pkgcore.repository.prototype.tree(frozen=False)[source]¶
Bases:
object
Template for all repository variants.
- Args:
frozen (bool): controls whether the repository is mutable or immutable
- Attributes:
raw_repo: if wrapping a repo, set raw_repo per instance to it livefs (bool): set it to True if it’s a repository representing a livefs package_class: callable to generate a package instance, must override configured (bool): if a repo is unusable for merging/unmerging
without being configured, set it to False
- frozen_settable (bool): controls whether frozen is able to be set
on initialization
operations_kls: callable to generate a repo operations instance
categories (dict): available categories in the repo packages (dict): mapping of packages to categories in the repo versions (dict): mapping of versions to packages in the repo frozen (bool): repository mutability status lock: TODO
- property aliases¶
- configured = True¶
- frozen_settable = True¶
- is_supported = True¶
- itermatch(restrict, sorter=None, pkg_filter=None, versioned=True, raw_pkg_cls=None, pkg_cls=None, force=None, yield_none=False)[source]¶
Generator that yields packages match a restriction.
- Parameters:
restrict (
pkgcore.restrictions.packages.PackageRestriction
instance.) – restriction to search viasorter – callable to do sorting during searching- if sorting the results, use this instead of sorting externally.
pkg_filter – callable to do package filtering
versioned – boolean controlling returning versioned or unversioned pkgs
raw_pkg_cls – custom package class to use for generating raw pkg instances
pkg_cls – custom package class to override raw pkg instances with
yield_none – if True then itermatch will yield None for every non-matching package. This is meant for use in combination with C{twisted.task.cooperate} or other async uses where itermatch should not wait many (wallclock) seconds between yielding packages. If you override this method you should yield None in long-running loops, strictly calling it for every package is not necessary.
- livefs = False¶
- masked¶
Base package mask restriction.
- 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
- property operations¶
- operations_kls¶
alias of
operations
- package_class = None¶
- pkg_masks = frozenset({})¶
- raw_repo = None¶