summaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-08-16 11:15:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-24 19:26:08 -0700
commitc6b808413d5ff1dbfdc4d615917345503029a282 (patch)
tree8aea6f97547e1e2c5e62ae79b1b666e4224426f1 /meta/classes/toolchain-scripts.bbclass
parent4c2baa237f925543ae5c87009ca74d75529e51a6 (diff)
downloadpoky-c6b808413d5ff1dbfdc4d615917345503029a282.tar.gz
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. (From OE-Core rev: 9e87f1347788beed181476dc4563085db14a4729) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r--meta/classes/toolchain-scripts.bbclass24
1 files changed, 21 insertions, 3 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index b7e4e04eaf..4a28e5fe38 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -101,17 +101,28 @@ toolchain_create_sdk_env_script_for_installer () {
101 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script 101 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
102} 102}
103 103
104#we get the cached site config in the runtime
105TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}"
106TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
107TOOLCHAIN_NEED_CONFIGSITE_CACHE = "eglibc ncurses"
108
104#This function create a site config file 109#This function create a site config file
105toolchain_create_sdk_siteconfig () { 110toolchain_create_sdk_siteconfig () {
106 local siteconfig=$1 111 local siteconfig=$1
107 shift
108 local files=$@
109 112
110 rm -f $siteconfig 113 rm -f $siteconfig
111 touch $siteconfig 114 touch $siteconfig
112 for sitefile in ${files} ; do 115
116 for sitefile in ${TOOLCHAIN_CONFIGSITE_NOCACHE} ; do
113 cat $sitefile >> $siteconfig 117 cat $sitefile >> $siteconfig
114 done 118 done
119
120 #get cached site config
121 for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do
122 if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
123 cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
124 fi
125 done
115} 126}
116 127
117#This function create a version information file 128#This function create a version information file
@@ -124,3 +135,10 @@ toolchain_create_sdk_version () {
124 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile 135 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
125 echo 'Timestamp: ${DATETIME}' >> $versionfile 136 echo 'Timestamp: ${DATETIME}' >> $versionfile
126} 137}
138
139python __anonymous () {
140 deps = bb.data.getVarFlag('do_configure', 'depends', d) or ""
141 for dep in (bb.data.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', d, True) or "").split():
142 deps += " %s:do_populate_sysroot" % dep
143 bb.data.setVarFlag('do_configure', 'depends', deps, d)
144}