portage.dep.dep_check module¶
- class portage.dep.dep_check._dep_choice(**kwargs)¶
Bases:
portage.util.SlotObject.SlotObject
- all_available¶
- all_in_graph¶
- all_installed_slots¶
- atoms¶
- copy()¶
Create a new instance and copy all attributes defined from __slots__ (including those from inherited classes).
- cp_map¶
- new_slot_count¶
- slot_map¶
- want_update¶
- portage.dep.dep_check._expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot='/', trees=None, use_mask=None, use_force=None, **kwargs)¶
In order to solve bug #141118, recursively expand new-style virtuals so as to collapse one or more levels of indirection, generating an expanded search space. In dep_zapdeps, new-style virtuals will be assigned zero cost regardless of whether or not they are currently installed. Virtual blockers are supported but only when the virtual expands to a single atom because it wouldn’t necessarily make sense to block all the components of a compound virtual. When more than one new-style virtual is matched, the matches are sorted from highest to lowest versions and the atom is expanded to || ( highest match … lowest match ).
The result is normalized in the same way as use_reduce, having a top-level conjuction, and no redundant nested lists.
- portage.dep.dep_check._iter_flatten(dep_struct)¶
Yield nested elements of dep_struct.
- portage.dep.dep_check._overlap_dnf(dep_struct)¶
Combine overlapping || groups using disjunctive normal form (DNF), in order to minimize the number of packages chosen to satisfy cases like “|| ( foo bar ) || ( bar baz )” as in bug #632026. Non-overlapping groups are excluded from the conversion, since DNF leads to exponential explosion of the formula.
When dep_struct does not contain any overlapping groups, no DNF conversion will be performed, and dep_struct will be returned as-is. Callers can detect this case by checking if the returned object has the same identity as dep_struct. If the identity is different, then DNF conversion was performed.
- portage.dep.dep_check.dep_check(depstring, mydbapi, mysettings, use='yes', mode=None, myuse=None, use_cache=1, use_binaries=0, myroot=None, trees=None)¶
Takes a depend string, parses it, and selects atoms. The myroot parameter is unused (use mysettings[‘EROOT’] instead).
- portage.dep.dep_check.dep_eval(deplist)¶
- portage.dep.dep_check.dep_wordreduce(mydeplist, mysettings, mydbapi, mode, use_cache=1)¶
Reduces the deplist to ones and zeros
- portage.dep.dep_check.dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, minimize_slots=False)¶
Takes an unreduced and reduced deplist and removes satisfied dependencies. Returned deplist contains steps that must be taken to satisfy dependencies.