-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ambiguity: RPM versions with an epoch #69
Comments
I can think of 3 different ways.
EpochFor those unfamiliar with epoch here's a quick description:
-- from https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s03.html |
Personally I think |
I did some more research and found this which says:
Since it's the most significant maybe it should be furthest left, and part of the version? And when combined with this from the same link:
and this link:
It seems like hyphens aren't allowed, so I think we'll go with a solution @jdillon suggested to me privately and use hyphens as a separator, which doesn't require URL encoding. Basically:
|
BTW the 0 or absent seems like a pretty nasty wrinkle to prefixing the version with this value. This means that for rpm:/ type you now have to additionally do additional checking version to actually get the version w/o epoch if that is what you are really after. I still strongly recommend that epoch should be encoded as qualifier and leave version alone.
|
To me, this indicates it's optional but useful in fine tuning version comparisons. Agree with @jdillon. I think epoch should be a qualifier with a recommendation that it be used. |
I like using a qualifier for It makes sense too for Debian packages that have a similar concept. In both cases, the epoch purpose is:
They are part of the metadata and not of the package archive filename for instance. See for instance these two that both use an epoch (both epoch 1) |
I agree that the epoch should be a qualifier and not part of the version number, the version number is intended for opaque equality comparison whereas the epoch is intended for ordering. Ordering could be useful for other package managers that don't have sortable version numbers so making the epoch a qualifier could be generally useful. |
Hrm. Epoch feels like a qualifier - it's optional, uncommon, and its main purpose is version ordering. But I'm not sure you can ignore it for "equality comparison", because epoch is definitely part of RPM's equality comparisons in a way that qualifiers like "arch" are not. For Fedora & derivatives (CentOS, RHEL, &c) you can safely assume that two packages with the same NVR but different arches came from the same source RPM. So these:
are two builds of the same sources and should be functionally equivalent. On a multi-arch system, RPM will consider a requirement for "curl = 7.66.0-1.fc31" satisfied if either package is installed. So those can probably be considered "equal" in most contexts where you don't care about arch. On the other hand, if these two packages exist:
they're definitely from two different source RPMs. It would not be safe to assume they were built from the same sources, or that a bug fixed in the latter build is fixed in the former. RPM would consider a requirement for "curl = 7.66.0-1.fc31" unsatisfied if the latter package was installed. I don't know what guarantees/expectations there are for uniqueness of unqualified purls, so I don't know if this would cause problems or not, but that worries me a little. |
Thanks, @wgwoods. I think this supports epoch being a qualifier since PURL doesn't make any explicit claims about how to compare PURLs and is consistent with the definition |
The README says:
Question: how should we combine the epoch with the version?
The text was updated successfully, but these errors were encountered: