Package _emerge :: Module FakeVartree :: Class FakeVartree
[hide private]

Class FakeVartree

source code

                   object --+    
                            |    
portage.dbapi.vartree.vartree --+
                                |
                               FakeVartree

This is implements an in-memory copy of a vartree instance that provides all the interfaces required for use by the depgraph. The vardb is locked during the constructor call just long enough to read a copy of the installed package information. This allows the depgraph to do it's dependency calculations without holding a lock on the vardb. It also allows things like vardb global updates to be done in memory so that the user doesn't necessarily need write access to the vardb in cases where global updates are necessary (updates are performed when necessary if there is not a matching ebuild in the tree). Instances of this class are not populated until the sync() method is called.

Instance Methods [hide private]
 
__init__(self, root_config, pkg_cache=None, pkg_root_config=None, dynamic_deps=True, ignore_built_slot_operator_deps=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_match_wrapper(self, cpv, use_cache=1)
Make sure the metadata in Package instances gets updated for any cpv that is returned from a match() call, since the metadata can be accessed directly from the Package instance instead of via aux_get().
source code
 
_aux_get_wrapper(self, cpv, wants, myrepo=None) source code
 
_apply_dynamic_deps(self, pkg, live_metadata) source code
 
dynamic_deps_preload(self, pkg, metadata) source code
 
cpv_discard(self, pkg)
Discard a package from the fake vardb if it exists.
source code
 
sync(self, acquire_lock=1)
Call this method to synchronize state with the real vardb after one or more packages may have been installed or uninstalled.
source code
 
_sync(self) source code
 
_pkg(self, cpv)
The RootConfig instance that will become the Package.root_config attribute can be overridden by the FakeVartree pkg_root_config constructory argument, since we want to be consistent with the depgraph._pkg() method which uses a specially optimized RootConfig that has a FakeVartree instead of a real vartree.
source code

Inherited from portage.dbapi.vartree.vartree: dep_bestmatch, dep_match, exists_specific, get_all_provides, get_provide, getallcpv, getallnodes, getebuildpath, getpath, getslot, inject, populate, zap

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

Properties [hide private]
  root

Inherited from object: __class__

Method Details [hide private]

__init__(self, root_config, pkg_cache=None, pkg_root_config=None, dynamic_deps=True, ignore_built_slot_operator_deps=False)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

Property Details [hide private]

root

Get Method:
unreachable.root(self)