ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Adding sub-selection to package issue


From: Stuart Hughes
Subject: Re: [Ltib] Adding sub-selection to package issue
Date: Fri, 28 Oct 2011 13:52:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

Hi Mike,

Variables do not get exported automatically to the environment. If you want something exported, it needs to have a name that includes: _PRECONFIG or _WANT_ or SYSCFG_

So try changing the symbol to:  PKG_BOOST_HEADER_ONLY_PRECONFIG
or maybe PKG_BOOST_WANT_HEADER_ONLY

Regards, Stuart

On 28/10/11 12:55, Mike Goins wrote:
I was attempting to add a sub-selection to a package to toggle the
behavior of the build/install in a package spec file but having an
issue getting the PKG variable during the spec file ops.  I used the
symlink toggle from bash as an example.  My goal is to modify the
boost installation to get a "header-only" installation.


What I have done (trimmed out the relevant sections for brevity.

Added an entry in packages.lkc:

config PKG_BOOST_HEADER_ONLY
     depends PKG_BOOST
     bool "boost header only install"
     help
        Header only option for boost install


Modified the boost spec file to check the value of that config:


%Build
if [ "$PKG_BOOST_HEADER_ONLY" = "y" ]
then
echo "Headers only, no build"
else
export PATH=$UNSPOOF_PATH
./bootstrap.sh  --prefix=$RPM_BUILD_ROOT/%{pfx}/usr
--libdir=$RPM_BUILD_ROOT/%{pfx}/usr/lib --without-icu
export PATH=$SPOOF_PATH
echo "using gcc : $GNUTARCH : $CXX  ; ">  tools/build/v2/user-config.jam
./bjam -d2 -q \
--toolset=gcc \
--layout=system \
--without-python \
-sZLIB_INCLUDE=$DEV_IMAGE/usr/include \
-sZLIB_LIBPATH=$DEV_IMAGE/usr/lib \
-sBZIP2_INCLUDE=$DEV_IMAGE/usr/include \
-sBZIP2_LIBPATH=$DEV_IMAGE/usr/lib \
stage
fi

(%Install is modified similarly but fails on the above already)


I added the check for rebuild in ltib itself:
# re-build the key (lhs) if any of the dependents (rhs) in the list have changed
$config_deps = {
....
            PKG_BOOST    =>  [ qw/PKG_BOOST_HEADER_ONLY/ ],
....


In the debug output I see the variable is getting set:

...
PKG_BOOST_HEADER_ONLY=y
...
PKG_ETHTOOL=
SYSCFG_TMPFS=tmpfs
PKG_BOOST=y
PKG_DISTCC=
PKG_BLUEZ_UTILS=
PKG_LIBPCAP=
...


The spec file is getting parsed correctly in the debug output:

Processing: boost
===================
...
install=rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT//opt/freescale/rootfs/i386/usr/include/boost
if [ "$PKG_BOOST_HEADER_ONLY" = "y" ]
then
cp -a boost $RPM_BUILD_ROOT//opt/freescale/rootfs/i386/usr/include/
else
./bjam -d2 -q \
--toolset=gcc \
--layout=system \
--without-python \
-sZLIB_INCLUDE=$DEV_IMAGE/include \
-sBZIP2_INCLUDE=$DEV_IMAGE/include \
install
fi
...

But when processing the spec file:
...
+ umask 022
+ cd /home/mike/rpm/BUILD
+ cd boost_1_43_0
+ '[' '' = y ']'
+ export PATH=.....


The '' = y test is missing the value for the variable PKG_BOOST_HEADER_ONLY

Does this config have to be somewhere else to get it visible in the
rpm spec file processing?  Is there something else I can check/debug
out?

Thanks

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

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




reply via email to

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