| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
paren_normalize Take a dependency structure as returned by paren_reduce or use_reduce and generate an equivalent structure that has no redundant lists. |
|||
| _use_dep | |||
|
_AtomCache Cache Atom instances from constructor calls and reuse identical instances when available. |
|||
|
Atom For compatibility with existing atom string manipulation code, this class emulates most of the str methods that are useful with atoms. |
|||
|
|||
|
|||
| Array |
|
||
| Array |
|
||
| String |
|
||
| List |
|
||
| List |
|
||
| String |
|
||
| String |
|
||
| String |
|
||
|
|||
| List |
|
||
| Integer |
|
||
| Integer |
|
||
| Integer |
|
||
| String |
|
||
| List |
|
||
| String |
|
||
| List |
|
||
|
|||
_paren_whitespace_re = re.compile(r'\S
|
|||
_dep_check_strict = True
|
|||
_dep_getcpv_cache =
|
|||
_valid_category = re.compile(r'^\w
|
|||
_invalid_atom_chars_regexp = re.compile(r'
|
|||
iscache =
|
|||
Imports: re, sys, types, weakref, chain, InvalidData, InvalidAtom, catpkgsplit, catsplit, pkgcmp, pkgsplit, ververify, portage
|
|||
@param cpv1: CategoryPackageVersion (no operators) Example: "sys-apps/portage-2.1"
@type cpv1: String
@param cpv2: CategoryPackageVersion (no operators) Example: "sys-apps/portage-2.1"
@type cpv2: String
@rtype: Boolean
@returns:
1. True if cpv1 = cpv2
2. False Otherwise
3. Throws PortageException if cpv1 or cpv2 is not a CPV
Example Usage:
>>> from portage.dep import cpvequal
>>> cpvequal("sys-apps/portage-2.1","sys-apps/portage-2.1")
>>> True
|
Strip all empty elements from an array
|
Take a string and convert all paren enclosed entities into sublists, optionally futher splitting the list elements by spaces. Example usage: >>> paren_reduce('foobar foo ( bar baz )',1) ['foobar', 'foo', ['bar', 'baz']] >>> paren_reduce('foobar foo ( bar baz )',0) ['foobar foo ', [' bar baz ']]
|
Convert a list to a string with sublists enclosed with parens. Example usage: >>> test = ['foobar','foo',['bar','baz']] >>> paren_enclose(test) 'foobar foo ( bar baz )'
|
Takes a paren_reduce'd array and reduces the use? conditionals out leaving an array with subarrays
|
Iterate recursively through a list of deps, if the dep is a '||' or '&&' operator, combine it with the list of deps that follows.. Example usage: >>> test = ["blah", "||", ["foo", "bar", "baz"]] >>> dep_opconvert(test) ['blah', ['||', 'foo', 'bar', 'baz']]
|
Return the operator used in a depstring. Example usage: >>> from portage.dep import * >>> get_operator(">=test-1.0") '>='
|
Return the category-package-version with any operators/slot specifications stripped off Example usage: >>> dep_getcpv('>=media-libs/test-3.0') 'media-libs/test-3.0'
|
Retrieve the slot on a depend. Example usage: >>> dep_getslot('app-misc/test:3') '3'
|
Removes dep components from the right side of an atom:
* slot
* use
* repo
|
Pull a listing of USE Dependencies out of a dep atom. Example usage: >>> dep_getusedeps('app-misc/test:3[foo][-bar]') ['foo','-bar']
|
Check to see if a depend atom is valid Example usage: >>> isvalidatom('media-libs/test-3.0') 0 >>> isvalidatom('>=media-libs/test-3.0') 1
|
Checks to see if the depstring is only the package name (no version parts) Example usage: >>> isjustname('media-libs/test-3.0') 0 >>> isjustname('test') 1 >>> isjustname('media-libs/test') 1
|
Checks to see if a package is in category/package-version or package-version format, possibly returning a cached result. Example usage: >>> isspecific('media-libs/test') 0 >>> isspecific('media-libs/test-3.0') 1
|
Return the category/package-name of a depstring. Example usage: >>> dep_getkey('media-libs/test-3.0') 'media-libs/test'
|
Searches list for entries that matches the package.
|
Returns the most specific entry that matches the package given.
|
Searches list for entries that matches the package.
|
|
|||
_dep_getcpv_cache
|
iscache
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Sep 10 22:58:59 2008 | http://epydoc.sourceforge.net |