| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
basestring str(object) -> string |
|||
|
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 | |||
|
Atom For compatibility with existing atom string manipulation code, this class emulates most of the str methods that are useful with atoms. |
|||
|
ExtendedAtomDict dict() wrapper that supports extended atoms as keys and allows lookup of a normal cp against other normal cp and extended cp. |
|||
| _RequiredUseLeaf | |||
| _RequiredUseBranch | |||
|
|||
|
|||
|
|||
|
|||
|
|||
| regular expression object |
|
||
| regular expression object |
|
||
|
|||
| Array |
|
||
| Array |
|
||
| String |
|
||
| List |
|
||
| List |
|
||
| List |
|
||
|
|||
| String |
|
||
| String |
|
||
| String |
|
||
| String |
|
||
|
|||
| List |
|
||
| Boolean |
|
||
| Integer |
|
||
| Boolean |
|
||
| String |
|
||
| List |
|
||
| String |
|
||
| List |
|
||
|
|||
| Set |
|
||
| Bool |
|
||
| Set of strings |
|
||
| String |
|
||
|
|||
_slot_separator =
|
|||
_slot_loose =
|
|||
_use =
|
|||
_op =
|
|||
_repo_separator =
|
|||
_repo_name =
|
|||
_repo_name_re = re.compile(r'
|
|||
_repo =
|
|||
_extended_cat =
|
|||
_slot_dep_re_cache =
|
|||
_atom_re_cache =
|
|||
_atom_wildcard_re_cache =
|
|||
_usedep_re_cache =
|
|||
_useflag_re_cache =
|
|||
_extended_cp_re_cache =
|
|||
__package__ =
|
|||
Imports: re, sys, warnings, chain, _encodings, _unicode_decode, _unicode_encode, _get_eapi_attrs, InvalidAtom, InvalidData, InvalidDependString, _, catpkgsplit, catsplit, vercmp, ververify, _cp, _cpv, _pkg_str, _slot, _unknown_repo, portage, _unicode, _slot_operator, cmp_sort_key, dep_check, writemsg
|
|||
|
When eapi is None then validation is not as strict, since we want the same to work for multiple EAPIs that may have slightly different rules.
|
@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
@return:
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 and split the list elements by spaces. All redundant brackets are removed. Example usage: >>> paren_reduce('foobar foo? ( bar baz )') ['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 dep string and reduces the use? conditionals out, leaving an array with subarrays. All redundant brackets are removed.
|
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']]
|
Recursively traverse nested lists and return a single list containing all non-list elements that are found. Example usage: >>> flatten([1, [2, 3, [4]]]) [1, 2, 3, 4]
|
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'
|
Retrieve the repo on a depend. Example usage: >>> dep_getrepo('app-misc/test::repository') 'repository'
|
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') False >>> isvalidatom('>=media-libs/test-3.0') True
|
Checks to see if the atom is only the package name (no version parts). Example usage: >>> isjustname('=media-libs/test-3.0') False >>> isjustname('media-libs/test') True
|
Checks to see if a package is in =category/package-version or package-version format. Example usage: >>> isspecific('media-libs/test') False >>> isspecific('=media-libs/test-3.0') True
|
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.
|
Returns a set of use flags that are used in the given REQUIRED_USE string
|
Checks if the use flags listed in 'use' satisfy all constraints specified in 'constraints'.
|
Take a dep string and an atom and return the use flags that decide if the given atom is in effect. Example usage: >>> extract_affecting_use('sasl? ( dev-libs/cyrus-sasl ) !minimal? ( cxx? ( dev-libs/cyrus-sasl ) )', 'dev-libs/cyrus-sasl') {'cxx', 'minimal', 'sasl'}
|
Return unpack dependencies string for given SRC_URI string.
|
|
|||
_slot_dep_re_cache
|
_atom_re_cache
|
_atom_wildcard_re_cache
|
_useflag_re_cache
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat May 18 16:59:25 2013 | http://epydoc.sourceforge.net |