diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2011-08-16 11:15:36 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-24 19:25:33 -0700 |
commit | 9e87f1347788beed181476dc4563085db14a4729 (patch) | |
tree | ae4c8eaaa02a2fa2f465d82829e80beb7a99b9cc /meta/classes/toolchain-scripts.bbclass | |
parent | 19fb07bf337e1d724798e2eb4479c35fc45b1941 (diff) | |
download | openembedded-core-9e87f1347788beed181476dc4563085db14a4729.tar.gz openembedded-core-9e87f1347788beed181476dc4563085db14a4729.tar.bz2 openembedded-core-9e87f1347788beed181476dc4563085db14a4729.tar.xz openembedded-core-9e87f1347788beed181476dc4563085db14a4729.zip |
toolchain-script.bbclass: Collected cached site config in runtime.
[YOCTO #892]
Modify the function toolchain_create_sdk_siteconfig to collect the
cached site config files which are specified by
TOOLCHAIN_NEED_CONFIGSITE_CACHE in runtime.
Also added task dependency to ensure the cached site config files are
generated.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index b7e4e04ea..4a28e5fe3 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -101,17 +101,28 @@ toolchain_create_sdk_env_script_for_installer () { echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script } +#we get the cached site config in the runtime +TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}" +TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d" +TOOLCHAIN_NEED_CONFIGSITE_CACHE = "eglibc ncurses" + #This function create a site config file toolchain_create_sdk_siteconfig () { local siteconfig=$1 - shift - local files=$@ rm -f $siteconfig touch $siteconfig - for sitefile in ${files} ; do + + for sitefile in ${TOOLCHAIN_CONFIGSITE_NOCACHE} ; do cat $sitefile >> $siteconfig done + + #get cached site config + for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do + if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then + cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig + fi + done } #This function create a version information file @@ -124,3 +135,10 @@ toolchain_create_sdk_version () { echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile echo 'Timestamp: ${DATETIME}' >> $versionfile } + +python __anonymous () { + deps = bb.data.getVarFlag('do_configure', 'depends', d) or "" + for dep in (bb.data.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', d, True) or "").split(): + deps += " %s:do_populate_sysroot" % dep + bb.data.setVarFlag('do_configure', 'depends', deps, d) +} |