| Trees | Indices | Help |
|
|---|
|
|
object --+
|
dbapi --+
|
vardbapi
|
|||
|
_owners_cache This class maintains an hash table that serves to index package contents by mapping the basename of file to a list of possible packages that own it. |
|||
| _owners_db | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| int |
|
||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
_excluded_dirs = re.compile(r'^
|
|||
_aux_cache_version =
|
|||
_owners_cache_version =
|
|||
_aux_cache_threshold = 5
|
|||
_aux_cache_keys_re = re.compile(r'^NEEDED\..
|
|||
_aux_multi_line_re = re.compile(r'^
|
|||
x =
|
|||
|
Inherited from |
|||
|
|||
| root | |||
| _aux_cache | |||
|
Inherited from Inherited from |
|||
|
|||
The categories parameter is unused since the dbapi class now has a categories property that is generated from the available packages.
|
Acquire a reentrant lock, blocking, for cooperation with concurrent processes. State is inherited by subprocesses, allowing subprocesses to reenter a lock that was acquired by a parent process. However, a lock can be released only by the same process that acquired it. |
Release a lock, decrementing the recursion level. Each unlock() call must be matched with a prior lock() call, or else an AssertionError will be raised if unlock() is called while not locked. |
This is called before an after any modifications, so that consumers can use directory mtimes to validate caches. See bug #290428. |
This method will grab the COUNTER. Returns a counter value. |
|
Set use_cache=0 to bypass the portage.cachedir() cache in cases when the accuracy of mtime staleness checks should not be trusted (generally this is only necessary in critical sections that involve merge or unmerge of packages).
|
Implement this in a child class
Args
None
Returns:
A list of strings 1 per CP in the datastore
|
caching match function
|
If the current user has permission and the internal aux_get cache has been updated, save it to disk and mark it unmodified. This is called by emerge after it has loaded the full vdb for use in dependency calculations. Currently, the cache is only written if the user has superuser privileges (since that's required to obtain a lock), but all users have read access and benefit from faster metadata lookups (as long as at least part of the cache is still valid). |
This automatically caches selected keys that are frequently needed by emerge for dependency calculations. The cached metadata is considered valid if the mtime of the package directory has not changed since the data was cached. The cache is stored in a pickled dict object with the following format: {version:"1", "packages":{cpv1:(mtime,{k1,v1, k2,v2, ...}), cpv2...}} If an error occurs while loading the cache pickle or the version is unrecognized, the cache will simple be recreated from scratch (it is completely disposable).
|
Search environment.bz2 for the specified variables. Returns a dict mapping variables to values, and any variables not found in the environment will not be included in the dict. This is useful for querying variables like ${SRC_URI} and ${A}, which are not saved in separate files but are available in environment.bz2 (see bug #395463). |
Args:
cpv - "sys-apps/foo-1.0"
metadata_updates = { key : newvalue }
Returns:
None
|
|
Use this method to retrieve the counter instead of having to trust the value of a global counter file that can lead to invalid COUNTER generation. When cache is valid, the package COUNTER files are not read and we rely on the timestamp of the package directory to validate cache. The stat calls should only take a short time, so performance is sufficient without having to rely on a potentially corrupt global counter file. The global counter file located at $CACHE_PATH/counter serves to record the counter of the last installed package and it also corresponds to the total number of installation actions that have occurred in the history of this package database.
|
This method will grab the next COUNTER value and record it back to the global file. Note that every package install must have a unique counter, since a slotmove update can move two packages into the same SLOT and in that case it's important that both packages have different COUNTER metadata.
|
|
|
|
|||
_excluded_dirs
|
|
|||
root
|
_aux_cache
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Jun 18 14:31:41 2013 | http://epydoc.sourceforge.net |