[Rpm-maint] [RFC/PATCH] comparisons without release
pmatilai at laiskiainen.org
Fri Dec 17 10:16:34 UTC 2010
On Mon, 29 Nov 2010, Michael Schroeder wrote:
> On Fri, Nov 26, 2010 at 08:23:40PM +0100, Michael Schroeder wrote:
>> Having said that, the current behaviour seems to be quite broken.
>> Please explain the following:
>> Provides: foo > 1.2-1
>> Requires: foo = 1.2 no match
>> Provides: foo >= 1.2-1
>> Requires: foo = 1.2 matches
>> I think the attached patch (completely untested) may fix the issue,
>> but I'll have to it through some tests on Monday.
> Seems to work well (after a missing '}' is added). The patch changes
> exactly the following cases:
> Provides Requires/Conflicts/...
> ------------ -----------
> foo = 1.2, foo < 1.2-1 no match -> match
> foo = 1.2, foo > 1.2-1 no match -> match
> foo <= 1.2, foo > 1.2-1 no match -> match
> foo >= 1.2, foo < 1.2-1 no match -> match
> foo < 1.2-1, foo = 1.2 no match -> match
> foo < 1.2-1, foo >= 1.2 no match -> match
> foo > 1.2-1, foo = 1.2 no match -> match
> foo > 1.2-1, foo <= 1.2 no match -> match
> The idea behind the patch is that a missing release is handled
> as "all/any release". Nothing changes for "foo < 1.2" or
> "foo > 1.2", it still just compares the version. But "foo = 1.2"
> means "everything with version 1.2". Thus, any match against
> a package with version "1.2" a any non-empty release must
> return true.
> I think the patch is safe to apply, it changes only the corner
> cases listed above. Packages that put version-release in the
> provides are never affected.
> Updated version of the patch attached.
Finally got around to look at this more closely and add big pile of
The cases where this patch changes behavior are marked with "???", the
expected result in the test-table now are for the current arguably broken
behavior /without/ the patch. AFAICS the patch does what it intends to and
indeed makes things saner overall, without adding new oddities (well, some
of the cases are a bit strange either way). I think I'll apply the patch,
unless somebody spots a show-stopper case in the behavior changes
(considering these apply to not just requires but conflicts and obsoletes
- Panu -
More information about the Rpm-maint