portage.package.ebuild._config.VirtualsManager module

class portage.package.ebuild._config.VirtualsManager.VirtualsManager(*args, **kwargs)

Bases: object

_compile_virtuals()

Stack installed and profile virtuals. Preference for virtuals decreases from left to right. Order of preference: 1. installed and in profile 2. installed only 3. profile only

_populate_treeVirtuals(vartree)

Initialize _treeVirtuals from the given vartree. It must not have been initialized already, otherwise our assumptions about immutability don’t hold.

_read_dirVirtuals(profiles)

Read the ‘virtuals’ file in all profiles.

add_depgraph_virtuals(mycpv, virts)

This updates the preferences for old-style virtuals, affecting the behavior of dep_expand() and dep_check() calls. It can change dbapi.match() behavior since that calls dep_expand(). However, dbapi instances have internal match caches that are not invalidated when preferences are updated here. This can potentially lead to some inconsistency (relevant to bug #1343).

get_virts_p()
getvirtuals()

Computes self._virtuals if necessary and returns it. self._virtuals is only computed on the first call.

populate_treeVirtuals_if_needed(vartree)

Initialize _treeVirtuals if it hasn’t been done already. This is a hack for consumers that already have an populated vartree.