_emerge.Package module

class _emerge.Package.Package(**kwargs)

Bases: _emerge.Task.Task

UNKNOWN_REPO = '__unknown__'
_buildtime_keys = ('BDEPEND', 'DEPEND')
_dep_keys = ('BDEPEND', 'DEPEND', 'IDEPEND', 'PDEPEND', 'RDEPEND')
_eval_masks()
_eval_visiblity(masks)
classmethod _gen_hash_key(cpv=None, installed=None, onlydeps=None, operation=None, repo_name=None, root_config=None, type_name=None, **kwargs)
_get_pkgsettings()
_hash_key
_hash_value
_init_use()
_invalid
_invalid_metadata(msg_type, msg)
class _iuse(pkg, tokens, iuse_implicit_match, eapi)

Bases: object

_iuse_implicit_match
_pkg
all
disabled
enabled
get_flag(flag)

Returns the flag’s name within the scope of this package or None if the flag is unknown.

get_missing_iuse(flags)
Returns

A list of flags missing from IUSE.

is_valid_flag(flags)
Returns

True if all flags are valid USE values which may be specified in USE dependencies, False otherwise.

tokens
_masks
_metadata
_metadata_exception(k, e)
_provided_cps
_provides
_raw_metadata
_requires
_runtime_keys = ('IDEPEND', 'PDEPEND', 'RDEPEND')
_use
class _use_class(pkg, enabled_flags)

Bases: object

_expand
_expand_hidden
_force
_frozensets = {}
_init_force_mask()
_mask
_pkg
enabled
property expand
property expand_hidden
property force
property mask
_use_conditional_misc_keys = ('LICENSE', 'PROPERTIES', 'RESTRICT')
_validate_deps()

Validate deps. This does not trigger USE calculation since that is expensive for ebuilds and therefore we want to avoid doing it unnecessarily (like for masked packages).

_validated_atoms
_visible
property build_id
property build_time
built
category
copy()

Create a new instance and copy all attributes defined from __slots__ (including those from inherited classes).

counter
cp
cpv
cpv_split
property defined_phases
depth
property eapi
get_keyword_mask()

returns None, ‘missing’, or ‘unstable’.

inherited
installed
property invalid
isHardMasked()

returns a bool if the cpv is in the list of expanded pmaskdict[cp] available ebuilds

iuse
property masks
property metadata
metadata_keys = ['BDEPEND', 'BINPKG_FORMAT', 'BUILD_ID', 'BUILD_TIME', 'CHOST', 'COUNTER', 'DEFINED_PHASES', 'DEPEND', 'EAPI', 'IDEPEND', 'INHERITED', 'IUSE', 'KEYWORDS', 'LICENSE', 'MD5', 'PDEPEND', 'PROVIDES', 'RDEPEND', 'repository', 'REQUIRED_USE', 'PROPERTIES', 'REQUIRES', 'RESTRICT', 'SIZE', 'SLOT', 'USE', '_mtime_']
mtime
onlydeps
operation
pf
property properties
property provided_cps
property provides
property repo
property repo_priority
property requires
property restrict
root
root_config
slot
slot_atom
property stable
sub_slot
type_name
property use
property validated_atoms

Returns all validated atoms from the deps, regardless of USE conditionals, with USE conditionals inside atoms left unevaluated.

version
property visible
with_use(use)

Return an Package instance with the specified USE flags. The current instance may be returned if it has identical USE flags. :param use: a set of USE flags :type use: frozenset :return: A package with the specified USE flags :rtype: Package

class _emerge.Package._PackageMetadataWrapper(pkg, metadata)

Bases: portage.cache.mappings.slot_dict_class.<locals>.SlotDict

Detect metadata updates and synchronize Package attributes.

_pkg
_prefix = '_val_'
_set__mtime_(k, v)
_set_counter(k, v)
_set_inherited(k, v)
_set_use(k, v)
_use_conditional_keys = frozenset({'LICENSE', 'PROPERTIES', 'RESTRICT'})
_val_BDEPEND
_val_BINPKG_FORMAT
_val_BUILD_ID
_val_BUILD_TIME
_val_CHOST
_val_COUNTER
_val_DEFINED_PHASES
_val_DEPEND
_val_DESCRIPTION
_val_EAPI
_val_HOMEPAGE
_val_IDEPEND
_val_INHERIT
_val_INHERITED
_val_IUSE
_val_KEYWORDS
_val_LICENSE
_val_MD5
_val_PDEPEND
_val_PROPERTIES
_val_PROVIDES
_val_RDEPEND
_val_REQUIRED_USE
_val_REQUIRES
_val_RESTRICT
_val_SIZE
_val_SLOT
_val_SRC_URI
_val_USE
_val__mtime_
_val_repository
_wrapped_keys = frozenset({'COUNTER', 'INHERITED', 'USE', '_mtime_'})
allowed_keys = frozenset({'BDEPEND', 'BINPKG_FORMAT', 'BUILD_ID', 'BUILD_TIME', 'CHOST', 'COUNTER', 'DEFINED_PHASES', 'DEPEND', 'DESCRIPTION', 'EAPI', 'HOMEPAGE', 'IDEPEND', 'INHERIT', 'INHERITED', 'IUSE', 'KEYWORDS', 'LICENSE', 'MD5', 'PDEPEND', 'PROPERTIES', 'PROVIDES', 'RDEPEND', 'REQUIRED_USE', 'REQUIRES', 'RESTRICT', 'SIZE', 'SLOT', 'SRC_URI', 'USE', '_mtime_', 'repository'})
clear()
copy()
property defined_phases

Returns tokens from DEFINED_PHASES metadata if it is defined, otherwise returns a tuple containing all possible phases. This makes it easy to do containment checks to see if it’s safe to skip execution of a given phase.

get(key, default=None)
items()
iteritems()
itervalues()
keys()
pop(key, *args)
popitem()
property properties
property restrict
setdefault(key, default=None)
update(*args, **kwargs)
values()