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:Package

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
[edit

Documentation

Note
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 link a package name to its listing at Packages.Gentoo.org in running text (or in a list).

This template should never be used inside of templates that simulate a command line interface, like {{Cmd}} and {{RootCmd}}, because the external-link icon (seen in the previous paragraph after "Packages.Gentoo.org" if you're using a graphical browser) could confuse readers in that context. For the same resaon, it should also be avoided in templates that display special types of code, like {{FileBox}}, {{CodeBox}}, and {{KernelBox}}, except possibly in the "title" line.

To provide a link to package information in a right-floated box, use {{InfoBox package}}.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) Package name in the form category-subcategory/packagename.

The value of the required anonymous parameter must match the name of a package in the Gentoo repository (popularly known as the "Portage tree"). The template does no checking of its input but simply links to the provided name. Valid package names can be determined using emerge on a running Gentoo system or by searching or browsing the repository online.

Usage

{{Package|cat-subcat/name

See the template's testcases:

Correct

One anonymous parameter matching a Portage category + package name
Wiki code
{{Package|sys-apps/portage}}
Main version
Sandbox version


Incorrect

One anonymous parameter not matching a Portage category + package name (broken link)
Wiki code
{{Package|portage}}
Main version
Sandbox version


No parameter (error message)
Wiki code
{{Package}}
Main version
{{Package template error}}
Parameter 1 not defined. For correct usage see Package template's documentation on the 1 parameter.
Sandbox version


See also

Note
The above documentation is transcluded from Template:Package/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.)