[Fedora-packaging] Epoch:0
Michael Schwendt
mschwendt at gmail.com
Tue Aug 6 09:41:39 UTC 2013
On Tue, 6 Aug 2013 16:15:26 +0800, Christopher Meng wrote:
> In fact if a package has Epoch 1 I would like to keep, but I can't
> understand why they started epoch from 0.
You would need to find a time-machine and return to the fedora.us era
where an explicit "Epoch: 0" was introduced to packages to make versioned
dependencies more strict/safe and more convenient to use.
For example, a dependency "Requires: libfoo >= 2.0-5" would be satisfied
by _any_ version of libfoo, if Epoch is set to a non-zero value inside
package libfoo:
$ rpmdev-vercmp 2.0-5 1:2.0-1
2.0-5 < 1:2.0-1
The packager assumes that 2.0-5 is new enough, but since Epoch is at 1
already, the older 2.0-1 build is seen as "new enough", too. It could even
happen that a rewritten/forked/split-off build of libfoo would restart with
a lower %version and a bumped %epoch. Then:
$ rpmdev-vercmp 2.0-5 1:0.1-1
2.0-5 < 1:0.1-1
The tedious work-around would be to look up the Epoch values for all
packages in versioned dependencies. Or to specific zero Epoch == no Epoch
in dependencies, which works fine nowadays. "Requires: libfoo >= 0:2.0-5"
$ rpmdev-vercmp 0:2.0-5 2.0-5
0:2.0-5 == 2.0-5
Drop old "Epoch: 0" definitions in spec files, if you still find some.
Most have been dropped already years ago.
http://www.redhat.com/archives/fedora-packaging/2005-February/msg00134.html
More information about the packaging
mailing list