]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate-cache-management.sh: don't hardcode available machines only to qemu*
authorMartin Jansa <martin.jansa@gmail.com>
Sun, 2 Sep 2012 11:13:21 +0000 (13:13 +0200)
committerSaul Wold <sgw@linux.intel.com>
Tue, 4 Sep 2012 05:52:56 +0000 (22:52 -0700)
* 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>
scripts/sstate-cache-management.sh

index e569487a8a02fcf83f1caf1c1b7c7a6d1e6e3ec2..491df5f3fecefa3a5448cd190f03dd3e7986bcc7 100755 (executable)
@@ -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"