RPM supports an Epoch header to provide version ordering in cases where its version comparison isn't sufficient, for example with 2.0a3 > 2.0. A package without Epoch specified is considered to have an Epoch of either 0 or -1, depending on some obscure factors. The documentation suggests that Epoch start at 1 and be incremented with each release.
Does the Epoch value have any size limitations? If I used a 32-bit or larger value, would this cause any kind of overflow?
Is this really an issue? It's gonna take you a long time to have 2^32 releases! Anyway, I found this in the rpm source:
int rpmVersionCompare(Header first, Header second)
{
struct rpmtd_s one, two;
static uint32_t zero = 0;
uint32_t *epochOne = &zero, *epochTwo = &zero;
so I'd say don't use a 64-bit epoch number. (There's a little more to it than that - it gets read through the struct rpmtd_s, which has lots of fancy schmancy void pointers, but yeah, it's uint32.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With