Hi,
I just took over a package and found this package has Epoch tag, but its value is 0. I'm not sure if I can remove it?
Thanks.
Yours sincerely, Christopher Meng
Always playing in Fedora Project
On Tue, 6 Aug 2013 09:09:33 +0800 Christopher Meng cickumqt@gmail.com wrote:
Hi,
I just took over a package and found this package has Epoch tag, but its value is 0. I'm not sure if I can remove it?
please do not remove it, there still can be tools that don't treat Epoch:0 and empty Epoch as equal. In the past they were different.
Dan
On Tue, Aug 6, 2013 at 2:21 PM, Dan Horák dan@danny.cz wrote:
please do not remove it, there still can be tools that don't treat Epoch:0 and empty Epoch as equal. In the past they were different.
Oh?
So are they treated same now? Yes? No?
In fact if a package has Epoch 1 I would like to keep, but I can't understand why they started epoch from 0.
Thanks.
On Tue, 6 Aug 2013 16:15:26 +0800 Christopher Meng cickumqt@gmail.com wrote:
On Tue, Aug 6, 2013 at 2:21 PM, Dan Horák dan@danny.cz wrote:
please do not remove it, there still can be tools that don't treat Epoch:0 and empty Epoch as equal. In the past they were different.
Oh?
So are they treated same now? Yes? No?
In fact if a package has Epoch 1 I would like to keep, but I can't understand why they started epoch from 0.
the rule for Epoch is - once it is there, it is there forever
Dan
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
packages in versioned dependencies. Or to specific zero Epoch == no Epoch
typo: s/specific/specify/
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
and the sentence is incomplete. What I wanted to add is that nowadays no Epoch and zero Epoch are the same and can be compared to eachother without trouble, whereas years ago such a comparison lead to problems. And, of course, versions in dependencies can get out-of-date, so eventually the packager will need to revisit them and bump them, too.
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
where an explicit "Epoch: 0" was introduced to packages to make versioned
Hmm, I think I've got that backwards. If memory serves correctly, first has been the explicit "0:" in versioned Req/Obs/Prov/Conf to aid RPM version comparison. The explicit "Epoch: 0" tag has followed later.
Anyway, drop a zero Epoch (and %{epoch} usage) in spec files, if they are still found.
Thanks, Michael!
Sent from S3 在 2013-8-6 PM6:17,"Michael Schwendt" mschwendt@gmail.com写道:
where an explicit "Epoch: 0" was introduced to packages to make versioned
Hmm, I think I've got that backwards. If memory serves correctly, first has been the explicit "0:" in versioned Req/Obs/Prov/Conf to aid RPM version comparison. The explicit "Epoch: 0" tag has followed later.
Anyway, drop a zero Epoch (and %{epoch} usage) in spec files, if they are still found. -- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
packaging@lists.fedoraproject.org