[Rpm-ecosystem] Special meaning of "+" (?) separator
zbyszek at in.waw.pl
Fri Sep 9 22:58:32 UTC 2016
On Fri, Sep 09, 2016 at 05:23:26PM -0400, Neal Gompa wrote:
> On Fri, Sep 9, 2016 at 4:24 PM, Igor Gnatenko <ignatenko at redhat.com> wrote:
> > Hi,
> > during process of getting tilde approved in Fedora Packaging
> > Guidelines we realized that we need some special handling for
> > separator (most probably) "+".
> > Some examples (left is what expected, right is what current situation):
> > 1.0+ > 1.0 | 1.0+ == 1.0
> > 1.0+20160101git < 1.0.1 | 1.0+20160101git > 1.0.1
> > During long discussion at #rpm.org on freenode with Florian and Panu:
> > 1. Florian didn't like to change behavior of "+" as it's already
> > allowed character and people might expect it to do something
> > different.
> > 2. From alternative symbols we needed to choose from: "@", "#", "^"
> > After thinking more about problem I realized that we probably just
> > change behavior of "+".
> Yes, this is the right way to go, as we don't need more "specialness"
> and it's relatively intuitive to indicate <ver>+<checkout> as the
> checkout above it.
> > Some questions are still in my mind:
> > * vercmp: 1~ ? 1+
> I'm not sure here. Normally, you use "1~" to indicate an all-inclusive
> set (pre-release, release, and post-release), as opposed to "1" (which
> would include only release and post-release).
> Strictly speaking 1~ < 1+ in comparison, as the tilde operator pushes
> it down and the plus operator would push it up.
Yes, I don't think it can be any doubt here. ~ is defined so that
1~ < 1, and 1 < 1+, so 1~ < 1+ by transitiveness of unequality operations.
> > * How "+" should be handled in (Build)Requires?
> > * BuildRequires: foo == 1+ should match 1+, 1+git, 1+whatever ?
> I'm not sure exactly how this should be handled... Probably 1+<whatever>?
Why should we introduce any special behaviour here? Normally the ==
operator requires an exact version match, and version 1+ !=
1+whatever, just like 1 != 1whatever, so 1+ should only match 1+. If
you want to match things starting with 1+, just write BuildRequires
foo >= 1+ .
> > * BuildRequires: foo >= 1 should match 1, 1.1, 1+git, 1.1+whatever ?
> > * BuildRequires: foo < 1+ should match 1, 1~git, 0.whatever ?
More information about the Rpm-ecosystem