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

Florian Weimer fweimer at redhat.com
Wed Sep 14 11:03:27 UTC 2016


On 09/14/2016 10:35 AM, Igor Gnatenko wrote:
> 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

Why is this a problem?  For RCs you need to use ~ anyway, because 
otherwise 1.0.rc1 > 1.0:

 >>> sorted(['1.0', '1.0.1', '1.1', '1.0+git20160101', '1.0.rc1', 
'1.0~rc1'], cmp=lambda a, b: rpm.labelCompare((a, '',''), (b, '', '')))
['1.0~rc1', '1.0', '1.0+git20160101', '1.0.rc1', '1.0.1', '1.1']

Florian


More information about the Rpm-ecosystem mailing list