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

Re: %iflibcversion %ifnlibcversion



On Wed, Jul 18, 2001 at 02:02:02PM +0200, Peter A Jonsson wrote:
> Hello,
> 
> I am interested in knowing which version of libc the system is running to know 
> whether one should apply patches or not. I looked in chapter 13 in "Maximum 
> RPM" under the "conditionals section" and I could not find anything there.
> 
> I added the macro _libcversion in macros, maybe a more proper name could have 
> been used.
> 
> Syntax is as follows:
> 
> %iflibcversion 2.2.2
> echo "Yes, we are running 2.2.2."
> %endif
> 

What's needed in rpm is a well defined, portable, and reasonably complete
set of tests and predictable name space, much like autoconf wrto config.status,
not more arcane --  compiled into rpm --  spec file syntax IMHO.

Here's a cheaper variant (entirely untested):

%{exapnd: %%define _libc_version %(<your test here>)}

%if %{_libc_version} = "2.2.2"	# <-- I think this works, maybe not
...
%endif

The %(<your test here>) could be as simple as
	%(rpm -q --qf '%%{version}' glibc)
on an rpm managed system.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





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