[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: version compare on expression.c



> > I was wondering if it would be possible to include an rpm version
> > compare on expression.c. This would make it possible to have
> > something like:
> > 
> > %if <version1> >= <version2>
> > 
> > Or something like this. For sure, the operator would have to change,
> > to avoid confusion with string comparisons.
> 
> Sure, anything's possible.
> 
> The devil is coming up with syntax, and there are other well known
> problems with %if handling in spec files as well.

Yes.. I'm aware of some of them.

> If you can get consensus on the Right Thing To Do, I'll be happy
> to add whatever.

Ok, thanks. I'll look for the right way to implement it.

> Personally, I dunno how useful version comparison during build
> is gonna be. There are a number of other (and better IMHO) ways
> to handle conditional packaging without the grotesqueness
> of %if handling in spec files.

Agreed. But unfortunately, in some cases, comparing versions of a library
or a program installed in the machine, and apply a patch conditionally,
for example, is needed. Since this version was already extracted
previously for other reasons (%define progver $(extract ver)), I'm not
aware of a better way to do this than doing "%if %{prover} > X.X".

Thank you!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

Attachment: pgp00027.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []