base.bbclass: add support for SOC_FAMILY in COMPATIBLE_MACHINES
authorChase Maupin <chasemaupin03@gmail.com>
Tue, 3 Aug 2010 11:47:20 +0000 (11:47 +0000)
committerKoen Kooi <koen@openembedded.org>
Wed, 4 Aug 2010 13:48:14 +0000 (15:48 +0200)
* Add support for using SOC_FAMILY in the COMPATIBLE_MACHINES
  setting for a recipe.
* This will allow recipes to work for entire families of
  devices without having to maintain/update the compatible
  devices as new devices are added into a family

Signed-off-by: Chase Maupin <chase.maupin@ti.com>
Acked-by: Denys Dmytriyenko <denys@ti.com>
Acked-by: Koen Kooi <k-kooi@ti.com>
Signed-off-by: Koen Kooi <koen@openembedded.org>
classes/base.bbclass

index 1847491..02c7875 100644 (file)
@@ -389,7 +389,9 @@ python () {
             import re
             this_machine = bb.data.getVar('MACHINE', d, 1)
             if this_machine and not re.match(need_machine, this_machine):
-                raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+                this_soc_family = bb.data.getVar('SOC_FAMILY', d, 1)
+                if this_soc_family and not re.match(need_machine, this_soc_family):
+                    raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
         need_target = bb.data.getVar('COMPATIBLE_TARGET_SYS', d, 1)
         if need_target: