summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-09-02 13:13:21 +0200
committerSaul Wold <sgw@linux.intel.com>2012-09-03 22:52:56 -0700
commitfb6d838b1b80f26e9261acfd3893a7ef7f9e1940 (patch)
treea17455c8922ceaaa05d0de5aacacf482c3eab202
parent6faf27b771176ff691c17a2dbfa98ac7b3ed1fc7 (diff)
downloadopenembedded-core-fb6d838b1b80f26e9261acfd3893a7ef7f9e1940.tar.gz
openembedded-core-fb6d838b1b80f26e9261acfd3893a7ef7f9e1940.tar.bz2
openembedded-core-fb6d838b1b80f26e9261acfd3893a7ef7f9e1940.zip
sstate-cache-management.sh: don't hardcode available machines only to qemu*
* find them dynamically in layers like AVAILTUNES Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rwxr-xr-xscripts/sstate-cache-management.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index e569487a8a..491df5f3fe 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -156,6 +156,7 @@ remove_duplicated () {
local oe_core_dir
local tunedirs
local all_archs
+ local all_machines
local ava_archs
local arch
local file_names
@@ -169,11 +170,12 @@ remove_duplicated () {
topdir=$(dirname $oe_core_dir)
tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include'`"
[ -n "$tunedirs" ] || echo_error "Can't find the tune directory"
+ all_machines="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/*' -name '*.conf' | sed -e 's/.*\///' -e 's/.conf$//'`"
all_archs=`grep -r -h "^AVAILTUNES .*=" $tunedirs | sed -e 's/.*=//' -e 's/\"//g'`
# Add the qemu and native archs
# Use the "_" to substitute "-", e.g., x86-64 to x86_64
# Sort to remove the duplicated ones
- all_archs=$(echo $all_archs qemuarm qemux86 qemumips qemuppc qemux86_64 $(uname -m) \
+ all_archs=$(echo $all_archs $all_machines $(uname -m) \
| sed -e 's/-/_/g' -e 's/ /\n/g' | sort -u)
echo "Done"