[Rpm-ecosystem] Special meaning of "+" (?) separator

Igor Gnatenko ignatenko at redhat.com
Sat Sep 10 06:02:42 UTC 2016


Attaching patch to what I came up.

If everything looks good, I will write same for libsolv.

On Sat, Sep 10, 2016 at 12:58 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> 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.
>
> +1
>
>> > 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 ?
>>
>> Yes.
>>
>> >     * BuildRequires: foo < 1+ should match 1, 1~git, 0.whatever ?
>>
>> Yes.
>
> Yes, yes.
>
> Zbyszek
> _______________________________________________
> Rpm-ecosystem mailing list
> Rpm-ecosystem at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem



-- 
-Igor Gnatenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm.patch
Type: text/x-patch
Size: 3034 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-ecosystem/attachments/20160910/b14fcc90/attachment.bin>


More information about the Rpm-ecosystem mailing list