[Rpm-maint] [rpm-software-management/rpm] RFE: Handle disttag (#589)

wladmis notifications at github.com
Sat Nov 10 19:17:51 UTC 2018


> ignatenkobrain: I don't think it makes sense to allow the disttag in dependencies, aka EVR. It's for the "canonical" package name, i.e. NEVRA.

Definitely it does not make sense to allow `DistTag` in dependencies because `DistTag` shows an alternative build: generally, there is no order. Meanwhile dependencies has `EVR` on the set of which comparison operations are defined, which cannot be defined for `DistTag`.

> In other words, 'rpm -qa' should print it and thus 'rpm -q' should understand it. It should also be a part of the filename, so '/' should not be used as a separator IMHO.

I'm not sure should `DistTag` be or not a part of the filename, it seems to be safer if it wouldn't, but if it would then the filename will be more descriptive.

Let's decide which format `dbiFindByLabelArch()` should match. I propose `N[-V[-R]][/D][.A]`, the reasoning is that this collision proofed against any other fields `name`, `version`, `release` and `arch`, it's compatible with the current format, it's easy to parse and requires a little changes in the source code. @ignatenkobrain proposes `N at D:E-V-R.A`, but this seems a bit strange, I would change this to `N[@D][-[E:]V[-R]][.A]` that is fine to me, compatible with current format and allow plainly put the `DistTag` value to the filename as it is in the full format record. @Conan-Kudo is for `N[-[E:]V[-R][.D]][.A]` or `N[-[E:]V[-R][-D]][.A]` but I don't like neither of these cause its issues.

Next, I think it is reasonable to add a new `rpmlib feature`. `rpm` that can handle the new format should provides this feature, and a package that was built with non-empty `DistTag` should requires this feature. Of course we cannot backdate this requirement for existing packages with non-empty `DistTag`, but this can add this requirement for new packages. @Conan-Kudo actually I don't like the name `rpmlib(DistTagInVersionComparison)` cause the feature is not about "version comparison", it's about "build matching".

> In other words, 'rpm -qa' should print it

For now `rpm -qa` prints `NVRA` but I also think that printring `NEVRA+DistTag` in the format would be more informative, but I also cannot be sure that this change does not break something.

Please, comment.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/589#issuecomment-437612820
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20181110/47b585ed/attachment.html>


More information about the Rpm-maint mailing list