This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Template:Emerge
Documentation
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.
As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.
Use this template to show a root level terminal prompt pre-formatted with the emerge command. By default the command is shown with the --ask command parameter.
Parameters
Parameter name | Required? | Default value | Description |
---|---|---|---|
Anonymous parameter 1 |
Yes | (n/a) | One or more package names (or atoms). Use {{=}} or {{!}} in place of the characters = or | .
|
params+ |
No | (n/a) | emerge command parameters to be displayed in addition to the default --ask. |
params |
No | (n/a) | emerge command parameters to be displayed instead of the default --ask. |
output |
No | (n/a) | The command's output. |
Note that this template does no checking to ensure its input specifies a valid emerge command (i.e., arbitrary package names and command parameters are possible). Article editors should make sure that the resulting command is correct.
Usage
See the template's testcases:
Correct
{{Emerge|sys-apps/portage}}
root #
emerge --ask sys-apps/portage
root #
emerge --ask sys-apps/portage
=
{{Emerge|{{=}}sys-apps/portage-1.2.3}}
root #
emerge --ask =sys-apps/portage-1.2.3
root #
emerge --ask =sys-apps/portage-1.2.3
{{Emerge|portage gentoolkit portage-utils}}
root #
emerge --ask portage gentoolkit portage-utils
root #
emerge --ask portage gentoolkit portage-utils
params+
to display additional emerge command parameters{{Emerge|portage|params+=--oneshot}}
root #
emerge --ask --oneshot portage
root #
emerge --ask --oneshot portage
params
to specify emerge command parameters in place of the default(s){{Emerge|portage|params=--pretend --nospinner}}
root #
emerge --pretend --nospinner portage
root #
emerge --pretend --nospinner portage
params=
(with empty value) to suppress default emerge command parameter(s){{Emerge|--info|params=}}
root #
emerge --info
root #
emerge --info
output
to show output{{Emerge|--info|params=|output=<pre>Portage ... USE_PYTHON</pre>}}
root #
emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.23-r3, 3.14.27-gentoo-wl x86_64) ================================================================= [...] Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
root #
emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.23-r3, 3.14.27-gentoo-wl x86_64) ================================================================= [...] Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Incorrect
{{Emerge}}
root #
emerge --ask {{{1}}}
root #
emerge --ask {{{1}}}
{{Emerge|portage|gentoolkit|portage-utils}}
root #
emerge --ask portage
root #
emerge --ask portage
See also
- {{Unmerge}} – Sister template to this one.
- {{RootCmd}} – Show a terminal prompt with root user permissions.
- {{Cmd}} – Show a prompt with standard user permissions.
- {{GenericCmd}} – Show a generic, easily formattable terminal prompt.
The above documentation is transcluded from Template:Emerge/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)