Syntax for version string testing

Dan Nicholson dbn.lists at gmail.com
Wed Dec 19 06:02:48 PST 2007


On Dec 18, 2007 2:43 PM, Paweł Różański <pawel.rozanski at gmail.com> wrote:
>
> I'm preparing a lib release. The question is doest pkg-config
> --atleast-version works for some of rc or pre notation ? eg
>
> 1.0.0 >= 1.0rc0
>
> Is there any way to express version 'before' 1.0.0 but not by 0.9.9 string?

Looking at the source, it is just a copy of rpmvercmp from rpm.
Fooling around with pkg-config, it seems that 1.0rcX is considered
less than 1.0.0, but 1.0.0rcX is considered greater than 1.0.0. So, if
your release numbering is as you show above, I think it would work for
`pkg-config --exists mypackage >= 1.0rc0'.

--
Dan


More information about the pkg-config mailing list