Note the '=' (equals) separator between name and version. In this form the version may contain colons (for the epoch) and hyphens (seen in some Debian packages).

The legacy specification style looks like this:

prefix:arch2/name-version-release/arch1:flags[context]

Due to the Redhat heritage of our systems the concatenation of the name-version-release elements using a hyphen is modelled on the Redhat package specification.

To wrap other parts of the syntax around this string in a way which is easily parseable we have added a few extra limitations on the permitted characters for some elements (e.g. see the release element).

There are 7 possible elements for a package specification, 3 of which are required.

Required Elements

Name

This is a string of at least 1 character in length and the first character MUST be in [a-zA-Z0-9_]. All subsequent characters must match [A-Za-z0-9_-.+]

Note that some package managers may have additional limitations on package name (e.g. Debian does not permit use of the '_' (underscore) character.

Version

This is a string of at least 1 character in length. All characters MUST be in the set [A-Za-z0-9:.~+-_*?].

Note that some package managers may have additional limitations on package version (e.g. Redhat does not permit use of the '-' (hyphen) character.

With the legacy style of specification this MUST NOT contain a hyphen/minus sign (-) and MUST NOT contain a colon (:).

If the string is an asterisk (*) this is interpreted as a wild-card value and the package tool will consider this to mean "use the greatest version available".

Note that we do NOT support the RPM epoch field correctly. If one is specified it will become part of the version string. This can subsequently cause problems when you try to build an RPM package file name from the available information as two RPM which are identical except for the epoch do not have different file names.

Release

This is a string of at least 1 character in length. All characters MUST be in the set [A-Za-z0-9.~+-_*?] (similar to the version string except : (colon) is not permitted).

Note that some package managers may have additional limitations on package version (e.g. Redhat does not permit use of the '-' (hyphen) character.

If the string is an asterisk (*) this is interpreted as a wild-card value and the package tool will consider this to mean "use the greatest release available for the specified version".

Not all platforms use the release field to identify package versions (e.g. Debian native packages) in which case the recommended practice is to always use an asterisk.

Optional Elements

Architecture

This is a string of at least 1 character in length which can be formed from the characters 0-9, a-z, A-Z and underscore (_).

This is the architecture of the platform for which the package was built (e.g. x86_64 or i686).

Note that the legacy specification style allows this to be expressed in two ways, this was done to support platforms which permit multiple architecture versions of the same package (e.g. i386 on x86_64). If you use both then the second will override the first.

On Linux, if the architecture is not specified for a package then the default for the current platform will be selected, as of updaterpms version 3.5.0 this will typically match what you expect.

Note that not all platforms use the architecture (e.g. OS X).

Prefix

This is a string of exactly one character in length. It can be one of question-mark (?), plus (+) or minus (-).

These are operators used by LCFG when processing package lists to apply overrides. Basically:

plus (+) : Add the package to the list or replace any package of the same name if it is already there.

minus (-) : Remove the package from the list if it is already there.

question-mark (?) : Replace any package of the same name if it is already there.

Flags

This is a string of at least 1 character in length which can be formed from the characters 0-9, a-z, A-Z.

These are used to control the per-package behaviour of the package management tool. See updaterpms (8) manual page for details of the supported flags.

Context

This is a string of at least 1 character in length which MUST NOT contain a right-square-bracket (]).

The context is used to specify when the package should be installed (e.g. install!=true which is "not at system-install time")