DevHeads.net

rpm's treatment of unversioned provides

RPM traditionally treats unversioned provides as meaning "any version".
Over on perl-devel list, it's been suggested that this is a bug in rpm.

Googling around, I can't find any specific rationale for why rpm does
this as opposed to say providing version 0. Can anybody enlighten me?

Paul.

Comments

Re: rpm's treatment of unversioned provides

By Michael Schroeder at 02/21/2011 - 12:56

On Mon, Feb 21, 2011 at 02:51:11PM +0000, Paul Howarth wrote:
I think it is for symmetry reasons:

Requires: foo require any version/release of foo
Requires: foo = 1 require version 1 of foo, any release
Requires: foo = 1-1 require version 1 of foo, release 1

Provides: foo provide any version/release of foo
Provides: foo = 1 provide version 1 of foo, any release
Provides: foo = 1-1 provide version 1 of foo, release 1

Also, if it always provides version 0 there would be no way to
tell it to provide all versions. So it's more flexible the
way that it is.

(Yes, Debian is different in that regard: versioned requires
never match unversioned provides for them. But they also don't
support an "any release" matcher.)

Cheers,
Michael.

Re: rpm's treatment of unversioned provides

By Petr Pisar at 02/21/2011 - 11:43

On 2011-02-21, Paul Howarth <paul@city-fan.org> wrote:
I'm really interrested why RPM dependecny solver behaves like Paul says
and what it is good for.

-- Petr