ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Environment variables


From: Stuart Hughes
Subject: Re: [Ltib] Environment variables
Date: Fri, 01 Aug 2008 08:44:29 +0100

Hi Luis,

Generally it's better not to add variables to setup_env_vars if you can
avoid it, but sometimes there's no option.  

A better way to query whether another package is installed is to query
the rpm database from the spec file.  You can add a line like (adapt to
your needs):

CAIRO_PKG="`rpm --dbpath %{_dbpath} -q cairo`"

If installed it would return the cairo and the version number.

Regards, Stuart


On Thu, 2008-07-31 at 19:31 -0300, Luis Felipe Strano Moraes wrote:
> Hi,
> 
> I'm creating some new packages to be used with ltib, but in order
> to run the configure script correctly during the Build part, I need to
> test if other packages have been selected for installation.
> I've added the packages I created both to pkg_map and to packages.lkc,
> I can select them during ltib --configure and everything.
> 
> What would be the best way to test if something has been set on the
> .spec file ? I can test using bash's test program like for example cairo does 
> :
> 
> if [ -n "$PKG_DIRECTFB"]
> 
> but the new lkc variables I created cannot be detected like this 
> ($PKG_DIRECTFB
> and others are explicitly set on ltib's setup_env_vars).
> 
> Should I just add the new ones to setup_env_vars, or is there any other way ?
> 
> Thanks in advance,
> --lf
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]