From 453a78aecefc9e7befce89d42b83dd51c1db6cd7 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 28 May 2007 13:25:40 +0000 Subject: 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 --- packages/tasks/task-base.bb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'packages/tasks/task-base.bb') diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb index cd4054981f..a4579cf8c3 100644 --- a/packages/tasks/task-base.bb +++ b/packages/tasks/task-base.bb @@ -1,9 +1,10 @@ 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 @@ ADD_WIFI = "" 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 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 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 "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) } -- cgit v1.2.3