pkgcore.resolver.plan module

class pkgcore.resolver.plan.merge_plan(dbs, per_repo_strategy, global_strategy=None, depset_reorder_strategy=None, process_built_depends=False, drop_cycles=False, debug=False, debug_handle=None, pdb_intercept=None)[source]

Bases: object

add_atom(atom)[source]

add an atom, recalculating as necessary.

Returns:

the last unresolvable atom stack if a solution can’t be found, else returns None if the atom was successfully added.

add_atoms(restricts, finalize=False)[source]
check_for_cycles(stack, cur_frame)[source]

Check the current stack for cyclical issues.

Parameters:
Returns:

True if no issues and resolution should continue, else the value to return after collapsing the calling frame

default_depset_reorder_strategy(depset, mode)[source]
static default_global_strategy(dbs, atom)[source]
property forced_restrictions
free_caches()[source]
generate_mangled_blocker(choices, blocker)[source]

converts a blocker into a “cannot block ourself” block

insert_blockers(stack, choices, blocks)[source]
insert_choice(atom, choices)[source]
static just_livefs_dbs(dbs)[source]
static just_nonlivefs_dbs(dbs)[source]
load_vdb_state()[source]
notify_choice_failed(stack, atom, choices, msg, msg_args=())[source]
notify_choice_succeeded(stack, atom, choices, msg='', msg_args=())[source]
notify_starting_mode(mode, stack)[source]
notify_trying_choice(stack, atom, choices)[source]
notify_viable(stack, atom, viable, msg='', pre_solved=False)[source]
classmethod prefer_downgrade_version_strategy(restrict, dbs)[source]
classmethod prefer_highest_version_strategy(dbs)[source]
classmethod prefer_livefs_dbs(dbs, just_vdb=None)[source]
Parameters:
  • dbs – db list to walk

  • just_vdb – if None, no filtering; if True, just vdb, if False, non-vdb only

Returns:

yields repos in requested ordering

static prefer_lowest_version_strategy(dbs)[source]
classmethod prefer_nonlivefs_dbs(dbs, just_vdb=None)[source]
Parameters:
  • dbs – db list to walk

  • just_vdb – if None, no filtering; if True, just vdb, if False, non-vdb only

Returns:

yields repos in requested ordering

classmethod prefer_reuse_strategy(dbs)[source]
process_blocker(stack, choices, blocker, mode, atom)[source]
process_dependencies(stack, choices, mode, depset, atom)[source]
process_dependencies_and_blocks(stack, choices, attr, atom=None, depth=None)[source]
process_finalize()[source]
reset(point=0)[source]
vdb_restrict = <PackageRestriction attr='repo.livefs' restriction=<EqualityMatch True negate=False @0x7fe8b3309080> @0x7fe8b349ad40>
class pkgcore.resolver.plan.resolver_frame(parent, mode, atom, choices, dbs, start_point, depth, drop_cycles, ignored=False, vdb_limited=False)[source]

Bases: object

atom
choices
property current_pkg

Return the package related to the resolver frame.

dbs
depth
drop_cycles
events
ignored
mode
parent
reduce_solutions(nodes)[source]
start_point
succeeded
vdb_limited
class pkgcore.resolver.plan.resolver_stack[source]

Bases: deque

add_event(event)[source]
add_frame(mode, atom, choices, dbs, start_point, drop_cycles, vdb_limited=False)[source]
property current_frame

itemgetter(item, …) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After f = itemgetter(2), the call f(r) returns r[2]. After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])

property depth

Return the number of items in a container.

frame_klass

alias of resolver_frame

index(frame, start=0, stop=None)[source]

D.index(value, [start, [stop]]) – return first index of value. Raises ValueError if the value is not present.

property parent
pop_frame(result)[source]
slot_cycles(trg_frame, **kwds)[source]