pkgcore.ebuild.formatter module

pmerge formatting module

class pkgcore.ebuild.formatter.BasicFormatter(**kwargs)[source]

Bases: Formatter

A basic formatter, intended for scripts

format(op)[source]

Formats an op. Subclasses must define this method

class pkgcore.ebuild.formatter.CountingFormatter(**kwargs)[source]

Bases: Formatter

Subclass for formatters that count packages

end()[source]

Output total package, operation, and download size counts.

visit_op(op_type)[source]

Track the number of package operations of each type.

class pkgcore.ebuild.formatter.Formatter(**kwargs)[source]

Bases: object

Base Formatter class: All formatters should be subclasses of this.

ask(question, responses=None, default_answer=None, limit=3)[source]
end()[source]

Called at the end, normally for summary information

format(op)[source]

Formats an op. Subclasses must define this method

pkgcore_config_type = <pkgcore.config.hint.ConfigHint object>
class pkgcore.ebuild.formatter.PkgcoreFormatter(**kwargs)[source]

Bases: Formatter

The original pkgcore output

format(op)[source]

Formats an op. Subclasses must define this method

class pkgcore.ebuild.formatter.PortageFormatter(**kwargs)[source]

Bases: CountingFormatter

Formatter designed to resemble portage output.

end()[source]

Output package repository list.

format(op)[source]

Formats an op. Subclasses must define this method

format_use(attr, pkg_iuse, pkg_use, old_pkg_iuse=None, old_pkg_use=None, sorter=<function PortageFormatter.<lambda>>)[source]

Write the current selection from a set of flags to a formatter.

Parameters:
  • attr (string) – name of the setting

  • pkg_iuse (set of strings) – all available use flags for the package

  • pkg_use (set of strings) – enabled use flags for the package

  • old_pkg_iuse (set of strings) – all available use flags in the previous version

  • old_pkg_use (set of strings) – enabled use flags in the previous version

class pkgcore.ebuild.formatter.PortageVerboseFormatter(**kwargs)[source]

Bases: VerboseFormatter, PortageFormatter

Formatter designed to resemble portage output in verbose mode.

class pkgcore.ebuild.formatter.use_expand_filter(use_expand, use_expand_hidden)[source]

Bases: object