Package portage :: Package dbapi :: Module bintree :: Class bindbapi
[hide private]

Class bindbapi

source code

   object --+        
            |        
        dbapi --+    
                |    
virtual.fakedbapi --+
                    |
                   bindbapi

Instance Methods [hide private]
 
__init__(self, mybintree=None, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
match(self, *pargs, **kwargs)
Given a dependency, try to find packages that match...
source code
 
cpv_exists(self, cpv, myrepo=None) source code
 
cpv_inject(self, cpv, **kwargs)
Adds a cpv to the list of available packages.
source code
 
cpv_remove(self, cpv)
Removes a cpv from the list of available packages.
source code
 
aux_get(self, mycpv, wants, myrepo=None)
Return the metadata keys in mylist for mycpv Args: mycpv - "sys-apps/foo-1.0" mylist - ["SLOT","DEPEND","HOMEPAGE"] myrepo - The repository name.
source code
 
aux_update(self, cpv, values)
Args:...
source code
 
cp_list(self, *pargs, **kwargs) source code
 
cp_all(self)
Implement this in a child class...
source code
 
cpv_all(self)
Return all CPVs in the db Args: None Returns: A list of Strings, 1 per CPV
source code
 
getfetchsizes(self, pkg)
This will raise MissingSignature if SIZE signature is not available, or InvalidSignature if SIZE signature is invalid.
source code

Inherited from virtual.fakedbapi (private): _clear_cache

Inherited from dbapi: close_caches, invalidentry, move_slot_ent, update_ents

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

Static Methods [hide private]

Inherited from dbapi (private): _cmp_cpv, _cpv_sort_ascending

Class Variables [hide private]
  _known_keys = frozenset([u'CHOST', u'DEFINED_PHASES', u'DEPEND...
Properties [hide private]

Inherited from dbapi: categories

Inherited from object: __class__

Method Details [hide private]

__init__(self, mybintree=None, **kwargs)
(Constructor)

source code 

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

Parameters:
  • exclusive_slots - When True, injecting a package with SLOT metadata causes an existing package in the same slot to be automatically removed (default is True).
Overrides: object.__init__
(inherited documentation)

match(self, *pargs, **kwargs)

source code 
Given a dependency, try to find packages that match
Args:
        origdep - Depend atom
        use_cache - Boolean indicating if we should use the cache or not
        NOTE: Do we ever not want the cache?
Returns:
        a list of packages that match origdep

Overrides: dbapi.match
(inherited documentation)

cpv_exists(self, cpv, myrepo=None)

source code 
Overrides: virtual.fakedbapi.cpv_exists

cpv_inject(self, cpv, **kwargs)

source code 

Adds a cpv to the list of available packages. See the exclusive_slots constructor parameter for behavior with respect to SLOT metadata.

Parameters:
  • mycpv - cpv for the package to inject
  • metadata - dictionary of raw metadata for aux_get() calls
  • metadata - dict
Overrides: virtual.fakedbapi.cpv_inject
(inherited documentation)

cpv_remove(self, cpv)

source code 

Removes a cpv from the list of available packages.

Overrides: virtual.fakedbapi.cpv_remove
(inherited documentation)

aux_get(self, mycpv, wants, myrepo=None)

source code 
Return the metadata keys in mylist for mycpv
Args:
        mycpv - "sys-apps/foo-1.0"
        mylist - ["SLOT","DEPEND","HOMEPAGE"]
        myrepo - The repository name.
Returns: 
        a list of results, in order of keys in mylist, such as:
        ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or [] if mycpv not found'

Overrides: dbapi.aux_get
(inherited documentation)

aux_update(self, cpv, values)

source code 

Args:
  cpv - "sys-apps/foo-1.0"
        metadata_updates = { key : newvalue }
Returns:
        None

Overrides: dbapi.aux_update
(inherited documentation)

cp_list(self, *pargs, **kwargs)

source code 
Overrides: dbapi.cp_list

cp_all(self)

source code 
Implement this in a child class
Args
        None
Returns:
        A list of strings 1 per CP in the datastore

Overrides: dbapi.cp_all
(inherited documentation)

cpv_all(self)

source code 
Return all CPVs in the db
Args:
        None
Returns:
        A list of Strings, 1 per CPV

This function relies on a subclass implementing cp_all, this is why the hasattr is there

Overrides: dbapi.cpv_all
(inherited documentation)

Class Variable Details [hide private]

_known_keys

Value:
frozenset([u'CHOST',
           u'DEFINED_PHASES',
           u'DEPEND',
           u'DESCRIPTION',
           u'EAPI',
           u'HDEPEND',
           u'HOMEPAGE',
           u'INHERITED',
...