_emerge.resolver.output module

Resolver output display operation.

class _emerge.resolver.output.Display

Bases: object

Formats and outputs the depgraph supplied it for merge/re-merge, etc.

__call__() :param depgraph: list :param favorites: defaults to [] :param verbosity: integer, defaults to None

_append_build_id(pkg_str, pkg, pkg_info)

Potentially appends repository to package string.

Parameters
  • pkg_str – string

  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string

_append_repository(pkg_str, pkg, pkg_info)

Potentially appends repository to package string.

Parameters
  • pkg_str – string

  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string

_append_slot(pkg_str, pkg, pkg_info)

Potentially appends slot and subslot to package string.

Parameters
  • pkg_str – string

  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string

_blockers(blocker)

Adds colorized strings to self.print_msg and self.blockers

Parameters

blocker – _emerge.Blocker.Blocker instance

Return type

bool

Modifies class globals: self.blocker_style, self.resolved,

self.print_msg

_display_use(pkg, pkg_info)

USE flag display

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – PkgInfo instance

Modifies self.use_expand_hidden, self.use_expand, self.verboseadd,

self.forced_flags

_get_installed_best(pkg, pkg_info)

we need to use “–emptrytree” testing here rather than “empty” param testing because “empty” param is used for -u, where you still do want to see when something is being upgraded.

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionay

Rtype addl, myoldbest

list, myinslotlist: list

Modifies self.counters.reinst, self.counters.new

_set_no_columns(pkg, pkg_info)

prints pkg info without column indentation.

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype the updated addl

_set_non_root_columns(pkg, pkg_info)

sets the indent level and formats the output

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string

_set_root_columns(pkg, pkg_info)

sets the indent level and formats the output

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string Modifies self.verboseadd

check_system_world(pkg)

Checks for any occurances of the package in the system or world sets

Parameters

pkg – _emerge.Package.Package instance

:rtype system and world booleans

convert_myoldbest(pkg, pkg_info)

converts and colorizes a version list to a string

Parameters
  • pkg – _emerge.Package.Package instance

  • pkg_info – dictionary

:rtype string.

empty_space_in_brackets()
gen_mask_str(pkg)
Parameters

pkg – _emerge.Package.Package instance

get_display_list(mylist)

Determines the display list to process

:param mylist :rtype list Modifies self.counters.blocks, self.counters.blocks_satisfied,

static get_ver_str(pkg)

Obtains the version string :param pkg: _emerge.Package.Package instance :rtype string

include_mask_str()
map_to_use_expand(myvals, forced_flags=False, remove_hidden=True)

Map use expand variables

Parameters
  • myvals – list

  • forced_flags – bool

  • remove_hidden – bool

:rtype ret dictionary

or ret dict, forced dict.

static pkgprint(pkg_str, pkg_info)

Colorizes a string acording to pkg_info settings

Parameters
  • pkg_str – string

  • pkg_info – dictionary

:rtype colorized string

print_blockers()

Performs the actual output printing of the pre-formatted blocker messages

print_messages(show_repos)

Performs the actual output printing of the pre-formatted messages

Parameters

show_repos – bool.

print_verbose(show_repos)

Prints the verbose output to std_out

Parameters

show_repos – bool.

set_pkg_info(pkg, ordered)

Sets various pkg_info dictionary variables

Parameters
  • pkg – _emerge.Package.Package instance

  • ordered – bool

:rtype pkg_info dictionary Modifies self.counters.restrict_fetch,

self.counters.restrict_fetch_satisfied

verbose_size(pkg, repoadd_set, pkg_info)

Determines the size of the downloads required

Parameters
  • pkg – _emerge.Package.Package instance

  • repoadd_set – set of repos to add

  • pkg_info – dictionary

Modifies class globals: self.myfetchlist, self.counters.totalsize,

self.verboseadd, repoadd_set.

_emerge.resolver.output.format_unmatched_atom(pkg, atom, pkg_use_enabled)

Returns two strings. The first string contains the ‘atom’ with parts of the atom colored, which ‘pkg’ doesn’t match. The second string has the same number of characters as the first one, but consists of only white space or ^. The ^ characters have the same position as the colored parts of the first string.