[oe-commits] org.oe.dev task-base: really add task-base-extended, fixed it's code

hrw commit openembedded-commits at lists.openembedded.org
Mon May 28 13:45:35 UTC 2007


task-base: really add task-base-extended, fixed it's code

task-base-extended code use sets which are Python 2.4 thing but it has
untested workaround for Python 2.3

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 5995a83d0430a8edc5974f2cfce4c4bf1150fb1e
ViewMTN: http://monotone.openembedded.org/revision.psp?id=5995a83d0430a8edc5974f2cfce4c4bf1150fb1e
Files:
1
packages/tasks/task-base.bb
Diffs:

#
# mt diff -r49f667c4bafb005d9ea8bbe2ca36b84cf5f05037 -r5995a83d0430a8edc5974f2cfce4c4bf1150fb1e
#
# 
# 
# patch "packages/tasks/task-base.bb"
#  from [961b22c36488167592bc0505a05ce7b768919121]
#    to [2b1d3f2ec6916368beaba77328b027ce2a8e9e69]
# 
============================================================
--- packages/tasks/task-base.bb	961b22c36488167592bc0505a05ce7b768919121
+++ packages/tasks/task-base.bb	2b1d3f2ec6916368beaba77328b027ce2a8e9e69
@@ -1,9 +1,10 @@ DESCRIPTION = "Merge machine and distro 
 DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
-PR = "r33"
+PR = "r34"
 
 PROVIDES = "${PACKAGES}"
 PACKAGES = 'task-boot \
             task-base \
+            task-base-extended \
             task-distro-base \
             task-machine-base \
             \
@@ -127,17 +128,21 @@ python __anonymous () {
 ADD_BT = ""
 
 python __anonymous () {
-    import bb
     # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
     # then include task-base-wifi in task-base
 
-    distro_features = bb.data.getVar("DISTRO_FEATURES", d, 1)
-    machine_features= bb.data.getVar("MACHINE_FEATURES", d, 1)
+    import bb
 
-    if distro_features.find("bluetooth") and not machine_features.find("bluetooth") and (machine_features.find("pcmcia") or machine_features.find("pci")  or  machine_features.find("usbhost")):
+    if not hasattr(__builtins__, 'set'):
+	from sets import Set as set
+
+    distro_features = set(bb.data.getVar("DISTRO_FEATURES", d, 1).split())
+    machine_features= set(bb.data.getVar("MACHINE_FEATURES", d, 1).split())
+
+    if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
 	bb.data.setVar("ADD_BT", "task-base-bluetooth", d)
 
-    if distro_features.find("wifi") and not machine_features.find("wifi") and (machine_features.find("pcmcia") or machine_features.find("pci")  or  machine_features.find("usbhost")):
+    if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
 	bb.data.setVar("ADD_WIFI", "task-base-wifi", d)
 }
 






More information about the Openembedded-commits mailing list