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

Igor Gnatenko ignatenko at redhat.com
Wed Sep 14 08:35:44 UTC 2016


On Wed, Sep 14, 2016 at 10:28 AM, Florian Weimer <fweimer at redhat.com> wrote:
> On 09/09/2016 10:24 PM, Igor Gnatenko wrote:
>>
>> 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
>
>
> I thought the approach was use any encoded that would result in the desired
> ordering?
>
> Why not stick the "git" in the front?
1.0+git20160101 < 1.0.rc1

Basically problem is that '+' == '.'
>
>>>> sorted(['1.0', '1.0.1', '1.1', '1.0+git20160101'], cmp=lambda a, b:
>>>> rpm.labelCompare((a,'',''), (b, '', '')))
> ['1.0', '1.0+git20160101', '1.0.1', '1.1']
>>>> sorted(['1.0', '1.0.1', '1.1', '1.0+20160101git'], cmp=lambda a, b:
>>>> rpm.labelCompare((a,'',''), (b, '', '')))
> ['1.0', '1.0.1', '1.0+20160101git', '1.1']
>
>> * vercmp: 1~ ? 1+
>> * How "+" should be handled in (Build)Requires?
>>     * BuildRequires: foo == 1+ should match 1+, 1+git, 1+whatever ?
>>     * BuildRequires: foo >= 1 should match 1, 1.1, 1+git, 1.1+whatever ?
>>     * BuildRequires: foo < 1+ should match 1, 1~git, 0.whatever ?
>
>
> Aren't these treated as pure version comparison, so the meaning is pretty
> much fixed?
>
> Florian
>
> _______________________________________________
> Rpm-ecosystem mailing list
> Rpm-ecosystem at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem



-- 
-Igor Gnatenko


More information about the Rpm-ecosystem mailing list