From Fedora Project Wiki

< PackagingDrafts

Revision as of 16:56, 9 February 2011 by Spot (talk | contribs) (Created page with '== Epoch == RPM supports a field called "Epoch:", which is a numeric field, that, if set, adds another qualifier for RPM to use in doing package comparisons. Specifically, if set...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Epoch

RPM supports a field called "Epoch:", which is a numeric field, that, if set, adds another qualifier for RPM to use in doing package comparisons. Specifically, if set, the Epoch of a package trumps all other comparisons (except for a lesser Epoch). If Epoch is not set in a package, RPM treats it the same as if it was set to 0.

Example: Version: 1.2 Release: 3%{?dist} Epoch: 1

A package with those definitions would be considered greater than a package with a higher version or a higher release. Since Epoch is confusing to humans (and can never be removed from a package once used), it should only be used in Fedora as a last resort to resolve upgrade ordering of a package.

Also, Epoch complicates normal packaging guidelines. If a package uses an Epoch, it must be referred to in any place where %{version}-%{release} is used. For example, if a package being depended upon has an Epoch, this must be listed when adding a versioned dependency:

Requires: foo = %{epoch}:%{version}-%{release}