ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Adding new package to configuration system


From: Peter Barada
Subject: Re: [Ltib] Adding new package to configuration system
Date: Wed, 17 Mar 2010 09:44:04 -0500

On Wed, 2010-03-17 at 14:49 +0100, Andrea Galbusera wrote:
Hi ltib folks,
this is driving me crazy in the last hours. Hope it's not a silly
question.

Following guidelines in doc/LtibFaq I added a new package to the Package
Selection List. Here is the relevant part in
config/userspace/packages.lkc:

> config PKG_TPT2000_CVS
>     bool "tpt2000 software from CVS"
>     default n
>     help
>     This package will include tpt2000 software as of the given CVS tag
> into rootfs.
> 
> config PKG_TPT2000_CVS_TAG
>     depends PKG_TPT2000_CVS
>     string "tpt2000 CVS tag to checkout"
>     default "tpt_build_ng"
>     help
>     Put in the name of the tpt2000 CVS tag you want to build from.

Both symbols get correctly into config/platform/mpc5121tpt/.config

> $ grep PKG_TPT2000 config/platform/mpc5121tpt/.config
> CONFIG_PKG_TPT2000_CVS=y
> CONFIG_PKG_TPI2000_CVS_TAG="tpt_build_ng"

I'd like to use the value assigned to PKG_TPT2000_CVS_TAG in my .spec
file to drive custom build options (in this example the CVS tag to
checkout), but I cannot get it to work. I mean either
PKG_TPT2000_CVS_TAG or PKG_TPT2000_CVS appear to be undefined (empty
string) within any section of my .spec file.

> %Prep
> echo "$PKG_TPT2000_CVS"
> echo "$PKG_TPT2000_CVS_TAG"

By looking at other .specs I guess this can be done. I also can
succesfully access the value of other PKG_XXX symbols from within
my .spec.

What am I missing? How do symbols flow from configuration system
to .spec files?

You need to modify the ltib script to export the symbol into the environment.  Look at the function "setup_env_vars", and add the following to the list of symbols experted to the environment:
    $ENV{PKG_TPT2000_CVS} = $cf=>{PKG_TPT2000_CVS} || "";
    $ENV{PKG_TPT2000_CVS_TAG} = $cf=>{PKG_TPT2000_CVS_TAG} || "";

Or at least this approch has worked for me in the past...

Then you can use the symbols $PKG_TPT2000_CVS and $PKG_TPT2000_CVS_TAG in your spec file.
I wish there was a more generic way to to do this, such as the symbol name pattern "PKG_xxx_EXPORTSYM_yyy" that would export all those symbols as PGK_xxx_yyy with the value of PKG_xxx_EXPORTSYM_yyy.  Then people wouldn't have to hack up the ltib script for any new packages that need tweaking based on configuration.

TIA
Andrea




_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib


reply via email to

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