[Rpm-maint] [PATCH] Auto convert hdr['epoch'] from None to 0
james at fedoraproject.org
Fri Nov 20 13:29:19 UTC 2009
On Fri, 2009-11-20 at 10:07 +0200, Panu Matilainen wrote:
> NAK. Sure for rpm internals no epoch is the same as epoch 0, but it's not
> the same for all uses: you might not want to show the million useless zero
> epochs to users,
I'm not sure I understand, you need special code to not show the zero
no matter what. If you forget to check, and fixup, epoch you get output
...so atm. you are required to check epoch twice if you don't want to
output "0:" ... after the patch you'd only need to check it once.
Also, AFAIK, any sane API user must be able to handle both None and '0'
and treat them identically ... which pretty much guarantees that all API
users will convert None to '0' immediately.
Everytime we've forgotten to immediately fix epoch, in yum, it's been a
> and the above would make it impossible to determine which
> packages actually *have* set an epoch (if only for distro statistics
> collection or whatever).
That's true, but does it really matter? What use are those stats?
I guess approaching it from the other point of view, what do you think
about changing rpmbuild to always store '0' in epoch?
James Antill - james at fedoraproject.org
More information about the Rpm-maint