Version specifier

From Gentoo Wiki
Revision as of 19:00, 3 November 2011 by Alec (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a reference for specifying versions of packages as used when interacting with Portage via emerge or /etc/portage. These are also known as "DEPEND atoms" in Portage documentation.

For the ebuild development perspective, see the devmanual.

Contents

Basic

category/package

Matches any version of a package.

Example:x11-libs/gtk+

matches: gtk+-1.2.10-r12 <br/>
matches: gtk+-2.24.7 <br/>
matches: gtk+-3.0.12-r1

By Version

~category/package-1.23

Matches version and any revision.

Example:~sys-devel/gdb-7.3

matches: gdb-7.3 <br/>
matches: gdb-7.3-r1 <br/>
 
does not match: gdb-7.3.1

=category/package-1.23*

Matches a version by the version range. Note that there's no "." before the "*".

Example:=sys-devel/gdb-7.3*

matches: gdb-7.3 <br/>
matches: gdb-7.3-r1 <br/>
matches: gdb-7.3.1

=category/package-1.23

Matches a version exactly.

Example:=www-client/firefox-7.0

matches: firefox-7.0
 
does not match: firefox-7.0-r1 <br/>
does not match: firefox-7.0.1

>=category/package-1.23

Matches the specified version or any higher version.

Example:>=dev-lang/python-2.7

matches: python-2.7 <br/>
matches: python-2.7.1-r1 <br/>
matches: python-3.2.2

>category/package-1.23

Matches a version strictly later than specified.

Example:>dev-lang/python-2.7

matches: python-2.7.1-r1 <br/>
matches: python-3.2.2
 
does not match: python-2.7

<category/package-1.23

Matches a version strictly older than specified.

Example:<dev-python/beautifulsoup-3.2

matches: dev-python/beautifulsoup-3.1.0.1-r1
 
does not match: dev-python/beautifulsoup-3.2.0

<=category/package-1.23

Matches the specified version or any older version.

Example:<=sys-fs/udev-171

matches: udev-171 <br/>
matches: udev-164-r2 <br/>
 
does not match: udev-171-r1

By SLOT

category/package:2

Matches package in the specified package SLOT. Note that there is no prefix.

Example:dev-db/sqlite:0

matches: sqlite-2.8.16-r5
 
does not match: sqlite-3.7.8

By Overlay

category/package::overlay

Matches a package from a specific overlay. This can be combined with other specifiers. The official portage tree is ::gentoo.

Example:=media-libs/mesa-9999::x11

matches: mesa version 9999 from the x11 overlay
 
does not match: any version from a different overlay.
Personal tools
Namespaces

Variants
Actions
Gentoo Websites logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Navigation
Toolbox
Categories