[Yum-devel] rangeCompare() incorrectly discards Epoch from provides

James Antill james at fedoraproject.org
Sat Jun 5 21:08:04 UTC 2010


On Sat, 2010-06-05 at 21:34 +0300, Ville Skyttä wrote:
> Hello,
> 
> This is the post I referred to in my previous compareEVR() patch explanation.
> See the attached patch (just for discussion purposes for now).

 Right, so this is why you are confused ... although I'll happily blame
rpm because it's insane, but we have to live with it. There are two
completely different reasons for "None" epochs:

1. Traditionally rpm has encoded "Epoch: 0" as "hdr['epoch'] is None".
In rpm-4.8.x you can now say: hdr['epochnum'] which will do the sane
thing (but we can't use that in yum for *mumble* years).

2. In a version comparison None can be used for any of EVR to mean
"don't care". Eg:

Requires: foo = 1

...is satisfied _equally_ by:

Provides: foo = 1
Provides: foo = 666:1-666
Provides: foo = 1-666
Provides: foo = 666:1

...and again, yes, it's insane but there's roughly 0% chance of fixing
it.

> First, pay attention to the added testcase in packagetests.py:
> 
> (('foo', 'LT', (None, '1.4.4', None)), ('foo', 'EQ', ('3', '1.2.4', '7')),  0)
> 
> In human readable form, "Requires: foo < 1.4.4" should _not_ be satisfied by 
> "Provides: foo = 3:1.2.4-7" (or the corresponding NEVR).

 Which means that this is the same as saying:

 "Requires: foo < 3:1.4.4" should _not_ be satisfied by "Provides: foo =
3:1.2.4-7"?

...which, I assume you'd not agree with.

-- 
James Antill - james at fedoraproject.org
http://yum.baseurl.org/wiki/whatsnew/3.2.28
http://yum.baseurl.org/wiki/YumBenchmarks
http://yum.baseurl.org/wiki/YumHistory


More information about the Yum-devel mailing list