LinuxCommandLibrary

einfo

Display extended information about EAPI

TLDR

Print all database names

$ einfo -dbs
copy

Print all information of the protein database in XML format
$ einfo -db [protein]
copy

Print all fields of the nuccore database
$ einfo -db [nuccore] -fields
copy

Print all links of the protein database
$ einfo -db [protein] -links
copy

SYNOPSIS

einfo ["MESSAGE" | - ]

PARAMETERS

"MESSAGE"
    Informational text to display, prefixed with " * " in green

-
    Read message from standard input instead of argument

DESCRIPTION

The einfo command is a utility from the Gentoo portage-utils package, designed for displaying informational messages during ebuild execution in Portage, Gentoo's package manager.

It outputs the provided message prefixed with a green-colored " * " on stdout, providing consistent, visually distinct logging for build processes. This helps users quickly identify informational notes amid verbose emerge output.

Unlike plain echo, einfo automatically handles terminal color support (green foreground, bold), falling back to plain text if colors are unsupported or disabled. It's commonly used in ebuild phase functions like src_prepare() or pkg_postinst() for status updates, e.g., "Applying patch".

If no message is given or - is used, it reads from stdin, supporting multi-line input. Exit status is always 0 on success, making it suitable for scripting. Widely used in Gentoo overlays and ebuilds for user-friendly feedback.

CAVEATS

Gentoo-specific; requires portage-utils package. Colors depend on terminal support and --color env vars like EINFO_COLOR. Not for general scripting outside ebuilds.

EXAMPLES

einfo "Configuring package"
einfo - <<EOF
This is a
multi-line info.
EOF

OUTPUT EXAMPLE

* Your message here (green, bold prefix)

ENVIRONMENT

EINFO_COLOR=yes|no|auto controls coloring; defaults to auto.

HISTORY

Introduced in early Gentoo Portage development (~2003) as part of functions.sh library; standalone einfo binary added in portage-utils (2006+) for elogv integration, enhancing colored logging.

SEE ALSO

ewarn(1), eerror(1), ebegin(1), eend(1), elog(1)

Copied to clipboard