Template:GPO/doc

From Gentoo Wiki
Jump to:navigation Jump to:search
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 Gentoo Portage Overlays 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 (e.g. as with this link: "https://gpo.zugaina.org", for those 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.

Parameters

To link a package name to its listing at gpo.zugaina.org

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Package name1

Package name in the form category-subcategory/packagename

Example
app-text/foo
Stringrequired
Repository name2

Repository name

Example
gentoo
Stringrequired

Usage

{{GPO|cat-subcat/name|repo}}

See the template's testcases:

Correct

Two anonymous parameters matching a qualified package name + repository
Wiki code
{{GPO|sys-apps/portage|gentoo}}
Main version
Install the sys-apps/portage::gentoo package for a great computing experience!
Sandbox version


Incorrect

One anonymous parameter (error message)
Wiki code
{{GPO|sys-apps/portage}}
Main version
{{GPO template error}}
Parameter 2 not defined. For correct usage see GPO template's documentation on the 2 parameter.
Sandbox version


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


See also